diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 1bbbe105b5b1..10b2f998525d 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -174,7 +174,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package.json b/eng/emitter-package.json index abe6a58e8878..130ec367d754 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,6 +1,6 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20230906.1" + "@azure-tools/typespec-csharp": "0.2.0-alpha.20230907.3" } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ApplicationData.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ApplicationData.xml index c6c98a55653f..1842aba0fbce 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ApplicationData.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ApplicationData.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -23,17 +35,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -48,17 +71,26 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetApplicationDataAsync with required parameters and parse the result. + +This sample shows how to call GetApplicationDataAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetApplicationDataAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetApplicationDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -89,18 +121,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetApplicationData with required parameters and parse the result. + +This sample shows how to call GetApplicationData and parse the result. ", "", new RequestContext()); +Response response = client.GetApplicationData("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetApplicationData with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -131,70 +172,64 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - isCarrier = true, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - area = new { - unit = "", - value = 123.45d, - }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["applicationProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["isCarrier"] = true, +["avgMaterial"] = new Dictionary() +{ +["unit"] = "", +["value"] = 123.45, +}, +["totalMaterial"] = null +, +} +}, + ["avgMaterial"] = null +, + ["totalMaterial"] = null +, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -225,70 +260,64 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - isCarrier = true, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - area = new { - unit = "", - value = 123.45d, - }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["applicationProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["isCarrier"] = true, +["avgMaterial"] = new Dictionary() +{ +["unit"] = "", +["value"] = 123.45, +}, +["totalMaterial"] = null +, +} +}, + ["avgMaterial"] = null +, + ["totalMaterial"] = null +, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -319,216 +348,354 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetAllApplicationDataAsync with required parameters and parse the result. + +This sample shows how to call GetAllApplicationDataAsync and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllApplicationDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllApplicationDataAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllApplicationData with required parameters and parse the result. + +This sample shows how to call GetAllApplicationData and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllApplicationData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllApplicationData with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllApplicationDataByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetAllApplicationDataByPartyIdAsync and parse the result. ", 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllApplicationDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllApplicationDataByPartyIdAsync with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllApplicationDataByPartyId with required parameters and parse the result. + +This sample shows how to call GetAllApplicationDataByPartyId and parse the result. ", 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllApplicationDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllApplicationDataByPartyId with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -542,19 +709,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; -var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -568,8 +747,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Attachments.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Attachments.xml index a53dbfb6ad3a..6869bbc34ca7 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Attachments.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Attachments.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetAttachmentAsync with required parameters and parse the result. + +This sample shows how to call GetAttachmentAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetAttachmentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAttachmentAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -25,17 +35,26 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call GetAttachment with required parameters and parse the result. + +This sample shows how to call GetAttachment and parse the result. ", "", new RequestContext()); +Response response = client.GetAttachment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAttachment with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -52,19 +71,28 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", content); -var data = File.OpenRead(""); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -81,19 +109,28 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdate with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. "); +RequestContent content = null; +Response response = client.CreateOrUpdate("", "", content); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +")); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -110,124 +147,219 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DownloadAsync with required parameters and parse the result. + +This sample shows how to call DownloadAsync and parse the result. ", "", new RequestContext()); +Response response = await client.DownloadAsync("", "", null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call DownloadAsync with all parameters and parse the result. +", "", null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call Download with required parameters and parse the result. + +This sample shows how to call Download and parse the result. ", "", new RequestContext()); +Response response = client.Download("", "", null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call Download with all parameters and parse the result. +", "", null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call GetAttachmentsByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetAttachmentsByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAttachmentsByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); +} +]]> - -This sample shows how to call GetAttachmentsByPartyId with required parameters and parse the result. + +This sample shows how to call GetAttachmentsByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAttachmentsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAttachmentsByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Boundaries.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Boundaries.xml index 8c107b33862d..d7be79092845 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Boundaries.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Boundaries.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -23,17 +35,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -48,82 +71,67 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. -", - centroid = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", - }, - bbox = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +() +{ + ["geometry"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - parentId = "", - area = new { - unit = "", - value = 123.45d, + ["type"] = "", + ["centroid"] = null +, + ["bbox"] = null +, + ["parentId"] = "", + ["area"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - parentType = "Field", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["parentType"] = "Field", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -146,83 +154,68 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. -", - centroid = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", - }, - bbox = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +() +{ + ["geometry"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - parentId = "", - area = new { - unit = "", - value = 123.45d, + ["type"] = "", + ["centroid"] = null +, + ["bbox"] = null +, + ["parentId"] = "", + ["area"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - parentType = "Field", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["parentType"] = "Field", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -245,18 +238,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetBoundaryAsync with required parameters and parse the result. + +This sample shows how to call GetBoundaryAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBoundaryAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetBoundaryAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -279,18 +281,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetBoundary with required parameters and parse the result. + +This sample shows how to call GetBoundary and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBoundary with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetBoundary("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -313,536 +324,712 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetOverlapAsync with required parameters and parse the result. + +This sample shows how to call GetOverlapAsync and parse the result. ", "", "", "", new RequestContext()); +Response response = await client.GetOverlapAsync("", "", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetOverlapAsync with all parameters and parse the result. +", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryArea").ToString()); Console.WriteLine(result.GetProperty("otherBoundaryArea").ToString()); Console.WriteLine(result.GetProperty("intersectingArea").ToString()); -]]> - +]]> - -This sample shows how to call GetOverlap with required parameters and parse the result. + +This sample shows how to call GetOverlap and parse the result. +", "", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetOverlap with all parameters and parse the result. ", "", "", "", new RequestContext()); +Response response = client.GetOverlap("", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryArea").ToString()); Console.WriteLine(result.GetProperty("otherBoundaryArea").ToString()); Console.WriteLine(result.GetProperty("intersectingArea").ToString()); -]]> - +]]> - -This sample shows how to call GetBoundariesAsync with required parameters and parse the result. + +This sample shows how to call GetBoundariesAsync and parse the result. ", "", new String[]{""}, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetBoundariesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetBoundariesAsync with all parameters and parse the result. +", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetBoundaries with required parameters and parse the result. + +This sample shows how to call GetBoundaries and parse the result. ", "", new String[]{""}, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetBoundaries(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetBoundaries with all parameters and parse the result. +", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - + This sample shows how to call SearchAsync and parse the result. ()); +await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call SearchAsync with all request content, and how to parse the result. +This sample shows how to call SearchAsync with all request content and parse the result. " - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, -}; - -await foreach (var item in client.SearchAsync(RequestContent.Create(data))) +}); +await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } -]]> - +]]> - + This sample shows how to call Search and parse the result. ()); +foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call Search with all request content, and how to parse the result. +This sample shows how to call Search with all request content and parse the result. " - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, -}; - -foreach (var item in client.Search(RequestContent.Create(data))) +}); +foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } -]]> - +]]> - -This sample shows how to call GetBoundariesByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetBoundariesByPartyIdAsync and parse the result. ", "", "", new String[]{""}, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetBoundariesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetBoundariesByPartyIdAsync with all parameters and parse the result. +", "", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetBoundariesByPartyId with required parameters and parse the result. + +This sample shows how to call GetBoundariesByPartyId and parse the result. ", "", "", new String[]{""}, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetBoundariesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetBoundariesByPartyId with all parameters and parse the result. +", "", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call SearchByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call SearchByPartyIdAsync and parse the result. ", RequestContent.Create(data))) +RequestContent content = RequestContent.Create(new Dictionary()); +await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call SearchByPartyIdAsync with all parameters and request content, and how to parse the result. +This sample shows how to call SearchByPartyIdAsync with all parameters and request content and parse the result. " - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, -}; - -await foreach (var item in client.SearchByPartyIdAsync("", RequestContent.Create(data))) +}); +await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } -]]> - +]]> - -This sample shows how to call SearchByPartyId with required parameters and parse the result. + +This sample shows how to call SearchByPartyId and parse the result. ", RequestContent.Create(data))) +RequestContent content = RequestContent.Create(new Dictionary()); +foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call SearchByPartyId with all parameters and request content, and how to parse the result. +This sample shows how to call SearchByPartyId with all parameters and request content and parse the result. " - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, -}; - -foreach (var item in client.SearchByPartyId("", RequestContent.Create(data))) +}); +foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; -var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -856,19 +1043,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -882,8 +1081,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/CropProducts.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/CropProducts.xml index cf1974df695a..17b31f28ce21 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/CropProducts.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/CropProducts.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetCropProductAsync with required parameters and parse the result. + +This sample shows how to call GetCropProductAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCropProductAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCropProductAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -28,18 +38,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetCropProduct with required parameters and parse the result. + +This sample shows how to call GetCropProduct and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCropProduct with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCropProduct("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -59,53 +78,55 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. " - }, - brand = "", - product = "", - trait = "", - relativeMaturity = new { - unit = "", - value = 123.45d, - }, - treatments = new[] { - "" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["cropIds"] = new List() +{ +"" +}, + ["brand"] = "", + ["product"] = "", + ["trait"] = "", + ["relativeMaturity"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["treatments"] = new List() +{ +"" +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -125,53 +146,55 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. " - }, - brand = "", - product = "", - trait = "", - relativeMaturity = new { - unit = "", - value = 123.45d, - }, - treatments = new[] { - "" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["cropIds"] = new List() +{ +"" +}, + ["brand"] = "", + ["product"] = "", + ["trait"] = "", + ["relativeMaturity"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["treatments"] = new List() +{ +"" +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -191,97 +214,178 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCropProductsAsync with required parameters and parse the result. + +This sample shows how to call GetCropProductsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetCropProductsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); - Console.WriteLine(result.GetProperty("brand").ToString()); - Console.WriteLine(result.GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("trait").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("treatments")[0].ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCropProductsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("cropIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("brand").ToString()); + Console.WriteLine(result[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("trait").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("treatments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetCropProducts with required parameters and parse the result. + +This sample shows how to call GetCropProducts and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetCropProducts(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); - Console.WriteLine(result.GetProperty("brand").ToString()); - Console.WriteLine(result.GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("trait").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("treatments")[0].ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCropProducts with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("cropIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("brand").ToString()); + Console.WriteLine(result[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("trait").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("treatments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Crops.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Crops.xml index 0647a12446d5..7c01e2a287aa 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Crops.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Crops.xml @@ -2,19 +2,29 @@ - -This sample shows how to call GetCropAsync with required parameters and parse the result. + +This sample shows how to call GetCropAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCropAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCropAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -25,24 +35,33 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetCrop with required parameters and parse the result. + +This sample shows how to call GetCrop and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCrop with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCrop("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -53,54 +72,55 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - breedingMethod = "VARIETY", - measurements = new { - key = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["phenotype"] = "", + ["breedingMethod"] = "VARIETY", + ["measurements"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -111,54 +131,55 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - breedingMethod = "VARIETY", - measurements = new { - key = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["phenotype"] = "", + ["breedingMethod"] = "VARIETY", + ["measurements"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -169,91 +190,160 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCropsAsync with required parameters and parse the result. + +This sample shows how to call GetCropsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetCropsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("phenotype").ToString()); - Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCropsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("phenotype").ToString()); + Console.WriteLine(result[0].GetProperty("breedingMethod").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetCrops with required parameters and parse the result. + +This sample shows how to call GetCrops and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetCrops(null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("phenotype").ToString()); - Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCrops with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("phenotype").ToString()); + Console.WriteLine(result[0].GetProperty("breedingMethod").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/DeviceDataModels.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/DeviceDataModels.xml index da0067f8ae13..ad4df52ee478 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/DeviceDataModels.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/DeviceDataModels.xml @@ -2,43 +2,45 @@ - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - manufacturer = "", - productCode = "", - ports = new[] { - new { - name = "", - type = "", - } - }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["ports"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["type"] = "", +} +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -56,48 +58,49 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - manufacturer = "", - productCode = "", - ports = new[] { - new { - name = "", - type = "", - } - }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["ports"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["type"] = "", +} +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -115,18 +118,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetDeviceDataModelAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceDataModelAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDeviceDataModelAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetDeviceDataModelAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -144,18 +156,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetDeviceDataModel with required parameters and parse the result. + +This sample shows how to call GetDeviceDataModel and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDeviceDataModel with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetDeviceDataModel("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -173,93 +194,150 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetDeviceDataModelsAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceDataModelsAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetDeviceDataModelsAsync("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetDeviceDataModelsAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetDeviceDataModels with required parameters and parse the result. + +This sample shows how to call GetDeviceDataModels and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetDeviceDataModels("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetDeviceDataModels with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Devices.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Devices.xml index b162a5ffdb68..37943d631aec 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Devices.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Devices.xml @@ -2,44 +2,45 @@ - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - integrationId = "", - type = "", - hardwareId = "", - reportingIntervalInSeconds = 1234, - parentDeviceId = "", - location = new { - latitude = 123.45d, - longitude = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deviceDataModelId"] = "", + ["integrationId"] = "", + ["type"] = "", + ["hardwareId"] = "", + ["reportingIntervalInSeconds"] = 1234, + ["parentDeviceId"] = "", + ["location"] = new Dictionary() + { + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -60,49 +61,49 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - integrationId = "", - type = "", - hardwareId = "", - reportingIntervalInSeconds = 1234, - parentDeviceId = "", - location = new { - latitude = 123.45d, - longitude = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deviceDataModelId"] = "", + ["integrationId"] = "", + ["type"] = "", + ["hardwareId"] = "", + ["reportingIntervalInSeconds"] = 1234, + ["parentDeviceId"] = "", + ["location"] = new Dictionary() + { + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -123,18 +124,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetDeviceAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDeviceAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetDeviceAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -155,18 +165,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetDevice with required parameters and parse the result. + +This sample shows how to call GetDevice and parse the result. ", "", new RequestContext()); +Response response = client.GetDevice("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDevice with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -187,99 +206,168 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetDevicesAsync with required parameters and parse the result. + +This sample shows how to call GetDevicesAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetDevicesAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("reportingIntervalInSeconds").ToString()); - Console.WriteLine(result.GetProperty("parentDeviceId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetDevicesAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deviceDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("reportingIntervalInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("parentDeviceId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetDevices with required parameters and parse the result. + +This sample shows how to call GetDevices and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetDevices("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("reportingIntervalInSeconds").ToString()); - Console.WriteLine(result.GetProperty("parentDeviceId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetDevices with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deviceDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("reportingIntervalInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("parentDeviceId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmBeatsClient.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmBeatsClient.xml index 4bdc95ef5e44..54fab2140e5d 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmBeatsClient.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmBeatsClient.xml @@ -1,5 +1,4 @@ - - + \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmOperationsDataIngestion.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmOperationsDataIngestion.xml index 325886caddbc..86ce13a16404 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmOperationsDataIngestion.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmOperationsDataIngestion.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("authProviderId").ToString()); +Console.WriteLine(result.GetProperty("startYear").ToString()); +]]> +This sample shows how to call GetJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -29,18 +41,29 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetJobDetails with required parameters and parse the result. + +This sample shows how to call GetJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("authProviderId").ToString()); +Console.WriteLine(result.GetProperty("startYear").ToString()); +]]> +This sample shows how to call GetJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -61,54 +84,55 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateJobAsync and parse the result. ", - authProviderId = "", - startYear = 1234, -}; - -var operation = await client.CreateJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["authProviderId"] = "", + ["startYear"] = 1234, +}); +Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); Console.WriteLine(result.GetProperty("startYear").ToString()); ]]> -This sample shows how to call CreateJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateJobAsync with all parameters and request content and parse the result. ", - authProviderId = "", - operations = new[] { - "" - }, - startYear = 1234, - isIncremental = true, - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["authProviderId"] = "", + ["operations"] = new List() +{ +"" +}, + ["startYear"] = 1234, + ["isIncremental"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); @@ -128,54 +152,55 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateJob and parse the result. ", - authProviderId = "", - startYear = 1234, -}; - -var operation = client.CreateJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["authProviderId"] = "", + ["startYear"] = 1234, +}); +Operation operation = client.CreateJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); Console.WriteLine(result.GetProperty("startYear").ToString()); ]]> -This sample shows how to call CreateJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateJob with all parameters and request content and parse the result. ", - authProviderId = "", - operations = new[] { - "" - }, - startYear = 1234, - isIncremental = true, - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["authProviderId"] = "", + ["operations"] = new List() +{ +"" +}, + ["startYear"] = 1234, + ["isIncremental"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); @@ -195,9 +220,8 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmerOAuthTokens.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmerOAuthTokens.xml index 5843f08a8040..fc3b75c0f3c1 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmerOAuthTokens.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/FarmerOAuthTokens.xml @@ -2,87 +2,97 @@ - -This sample shows how to call GetOAuthConnectionLinkAsync with required request content, and how to parse the result. + +This sample shows how to call GetOAuthConnectionLinkAsync and parse the result. ", - oAuthProviderId = "", - userRedirectLink = "", -}; - -Response response = await client.GetOAuthConnectionLinkAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", +}); +Response response = await client.GetOAuthConnectionLinkAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call GetOAuthConnectionLinkAsync with all request content, and how to parse the result. +This sample shows how to call GetOAuthConnectionLinkAsync with all request content and parse the result. ", - oAuthProviderId = "", - userRedirectLink = "", - userRedirectState = "", -}; - -Response response = await client.GetOAuthConnectionLinkAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", + ["userRedirectState"] = "", +}); +Response response = await client.GetOAuthConnectionLinkAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> - +]]> - -This sample shows how to call GetOAuthConnectionLink with required request content, and how to parse the result. + +This sample shows how to call GetOAuthConnectionLink and parse the result. ", - oAuthProviderId = "", - userRedirectLink = "", -}; +TokenCredential credential = new DefaultAzureCredential(); +FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -Response response = client.GetOAuthConnectionLink(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", +}); +Response response = client.GetOAuthConnectionLink(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call GetOAuthConnectionLink with all request content, and how to parse the result. +This sample shows how to call GetOAuthConnectionLink with all request content and parse the result. ", - oAuthProviderId = "", - userRedirectLink = "", - userRedirectState = "", -}; +TokenCredential credential = new DefaultAzureCredential(); +FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); -Response response = client.GetOAuthConnectionLink(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", + ["userRedirectState"] = "", +}); +Response response = client.GetOAuthConnectionLink(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -97,17 +107,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -122,59 +143,105 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetAuthenticatedFarmersDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetAuthenticatedFarmersDetailsAsync and parse the result. "}, new String[]{""}, true, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAuthenticatedFarmersDetailsAsync(null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("authProviderId").ToString()); - Console.WriteLine(result.GetProperty("isValid").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); } ]]> - +This sample shows how to call GetAuthenticatedFarmersDetailsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, true, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result[0].GetProperty("isValid").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); +} +]]> - -This sample shows how to call GetAuthenticatedFarmersDetails with required parameters and parse the result. + +This sample shows how to call GetAuthenticatedFarmersDetails and parse the result. "}, new String[]{""}, true, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAuthenticatedFarmersDetails(null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("authProviderId").ToString()); - Console.WriteLine(result.GetProperty("isValid").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); } ]]> - +This sample shows how to call GetAuthenticatedFarmersDetails with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, true, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result[0].GetProperty("isValid").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -188,19 +255,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -214,8 +293,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Farms.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Farms.xml index 9f61bd5c7853..ddb392882dbd 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Farms.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Farms.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -23,17 +35,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -48,17 +71,26 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetFarmAsync with required parameters and parse the result. + +This sample shows how to call GetFarmAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetFarmAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetFarmAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -72,18 +104,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetFarm with required parameters and parse the result. + +This sample shows how to call GetFarm and parse the result. ", "", new RequestContext()); +Response response = client.GetFarm("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetFarm with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -97,40 +138,39 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -144,40 +184,39 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -191,148 +230,262 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetFarmsAsync with required parameters and parse the result. + +This sample shows how to call GetFarmsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetFarmsAsync(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFarmsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetFarms with required parameters and parse the result. + +This sample shows how to call GetFarms and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetFarms(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFarms with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetFarmsByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetFarmsByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetFarmsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFarmsByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetFarmsByPartyId with required parameters and parse the result. + +This sample shows how to call GetFarmsByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetFarmsByPartyId("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFarmsByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -346,19 +499,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -372,8 +537,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Fields.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Fields.xml index 88548cbba531..7cd4a4a18cdb 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Fields.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Fields.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -23,17 +35,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -48,17 +71,26 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetFieldAsync with required parameters and parse the result. + +This sample shows how to call GetFieldAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetFieldAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetFieldAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -73,18 +105,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetField with required parameters and parse the result. + +This sample shows how to call GetField and parse the result. ", "", new RequestContext()); +Response response = client.GetField("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetField with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -99,41 +140,40 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["farmId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -148,41 +188,40 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["farmId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -197,152 +236,278 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetFieldsAsync with required parameters and parse the result. + +This sample shows how to call GetFieldsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetFieldsAsync(null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFieldsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetFields with required parameters and parse the result. + +This sample shows how to call GetFields and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetFields(null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFields with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetFieldsByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetFieldsByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetFieldsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFieldsByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetFieldsByPartyId with required parameters and parse the result. + +This sample shows how to call GetFieldsByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetFieldsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFieldsByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -356,19 +521,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -382,8 +559,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/HarvestData.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/HarvestData.xml index 179cab5df4b7..d6eefda3c706 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/HarvestData.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/HarvestData.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -23,17 +35,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -48,17 +71,26 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetHarvestDataAsync with required parameters and parse the result. + +This sample shows how to call GetHarvestDataAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetHarvestDataAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetHarvestDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -104,18 +136,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetHarvestData with required parameters and parse the result. + +This sample shows how to call GetHarvestData and parse the result. ", "", new RequestContext()); +Response response = client.GetHarvestData("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetHarvestData with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -161,101 +202,79 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - value = 123.45d, - }, - avgYield = new { - unit = "", - value = 123.45d, - }, - totalWetMass = new { - unit = "", - value = 123.45d, - }, - avgWetMass = new { - unit = "", - value = 123.45d, - }, - avgMoisture = new { - unit = "", - value = 123.45d, - }, - avgSpeed = new { - unit = "", - value = 123.45d, - }, - harvestProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalYield = new { - unit = "", - value = 123.45d, - }, - avgYield = new { - unit = "", - value = 123.45d, - }, - avgMoisture = new { - unit = "", - value = 123.45d, - }, - totalWetMass = new { - unit = "", - value = 123.45d, - }, - avgWetMass = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["totalYield"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["avgYield"] = null +, + ["totalWetMass"] = null +, + ["avgWetMass"] = null +, + ["avgMoisture"] = null +, + ["avgSpeed"] = null +, + ["harvestProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalYield"] = null +, +["avgYield"] = null +, +["avgMoisture"] = null +, +["totalWetMass"] = null +, +["avgWetMass"] = null +, +} +}, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -301,101 +320,79 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - value = 123.45d, - }, - avgYield = new { - unit = "", - value = 123.45d, - }, - totalWetMass = new { - unit = "", - value = 123.45d, - }, - avgWetMass = new { - unit = "", - value = 123.45d, - }, - avgMoisture = new { - unit = "", - value = 123.45d, - }, - avgSpeed = new { - unit = "", - value = 123.45d, - }, - harvestProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalYield = new { - unit = "", - value = 123.45d, - }, - avgYield = new { - unit = "", - value = 123.45d, - }, - avgMoisture = new { - unit = "", - value = 123.45d, - }, - totalWetMass = new { - unit = "", - value = 123.45d, - }, - avgWetMass = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["totalYield"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["avgYield"] = null +, + ["totalWetMass"] = null +, + ["avgWetMass"] = null +, + ["avgMoisture"] = null +, + ["avgSpeed"] = null +, + ["harvestProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalYield"] = null +, +["avgYield"] = null +, +["avgMoisture"] = null +, +["totalWetMass"] = null +, +["avgWetMass"] = null +, +} +}, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -441,276 +438,414 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetAllHarvestDataAsync with required parameters and parse the result. + +This sample shows how to call GetAllHarvestDataAsync and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllHarvestDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllHarvestDataAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllHarvestData with required parameters and parse the result. + +This sample shows how to call GetAllHarvestData and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllHarvestData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllHarvestData with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllHarvestDataByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetAllHarvestDataByPartyIdAsync and parse the result. ", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllHarvestDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllHarvestDataByPartyIdAsync with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllHarvestDataByPartyId with required parameters and parse the result. + +This sample shows how to call GetAllHarvestDataByPartyId and parse the result. ", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllHarvestDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllHarvestDataByPartyId with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -724,19 +859,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; -var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -750,8 +897,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ImageProcessing.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ImageProcessing.xml index d0bfd8493e8c..bf2816a0b8ad 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ImageProcessing.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ImageProcessing.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetRasterizeJobAsync with required parameters and parse the result. + +This sample shows how to call GetRasterizeJobAsync and parse the result. ", new RequestContext()); +Response response = await client.GetRasterizeJobAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); +Console.WriteLine(result.GetProperty("shapefileColumnNames")[0].ToString()); +]]> +This sample shows how to call GetRasterizeJobAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -27,18 +39,29 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetRasterizeJob with required parameters and parse the result. + +This sample shows how to call GetRasterizeJob and parse the result. ", new RequestContext()); +Response response = client.GetRasterizeJob("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); +Console.WriteLine(result.GetProperty("shapefileColumnNames")[0].ToString()); +]]> +This sample shows how to call GetRasterizeJob with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -57,54 +80,56 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateRasterizeJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateRasterizeJobAsync and parse the result. ", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, -}; - -var operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, +}); +Operation operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); Console.WriteLine(result.GetProperty("shapefileColumnNames")[0].ToString()); ]]> -This sample shows how to call CreateRasterizeJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateRasterizeJobAsync with all parameters and request content and parse the result. ", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); @@ -122,54 +147,56 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateRasterizeJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateRasterizeJob and parse the result. ", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, -}; - -var operation = client.CreateRasterizeJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, +}); +Operation operation = client.CreateRasterizeJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); Console.WriteLine(result.GetProperty("shapefileColumnNames")[0].ToString()); ]]> -This sample shows how to call CreateRasterizeJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateRasterizeJob with all parameters and request content and parse the result. ", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateRasterizeJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateRasterizeJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); @@ -187,9 +214,8 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/InsightAttachments.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/InsightAttachments.xml index 1471ead8d9ec..945ab1080da5 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/InsightAttachments.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/InsightAttachments.xml @@ -2,15 +2,25 @@ - -This sample shows how to call CreateOrUpdateAsync with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. "); +RequestContent content = RequestContent.Create(""); +Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); -Response response = await client.CreateOrUpdateAsync("", "", "", "", "", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("insightId").ToString()); +]]> +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +")); +Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -29,19 +39,28 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdate with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. "); +Response response = client.CreateOrUpdate("", "", "", "", "", content); -var data = File.OpenRead(""); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("insightId").ToString()); +]]> +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +", "", "", "", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -60,17 +79,26 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call GetInsightAttachmentAsync with required parameters and parse the result. + +This sample shows how to call GetInsightAttachmentAsync and parse the result. +", "", "", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("insightId").ToString()); +]]> +This sample shows how to call GetInsightAttachmentAsync with all parameters and parse the result. ", "", "", "", "", new RequestContext()); +Response response = await client.GetInsightAttachmentAsync("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -89,17 +117,26 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call GetInsightAttachment with required parameters and parse the result. + +This sample shows how to call GetInsightAttachment and parse the result. ", "", "", "", "", new RequestContext()); +Response response = client.GetInsightAttachment("", "", "", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("insightId").ToString()); +]]> +This sample shows how to call GetInsightAttachment with all parameters and parse the result. +", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -118,128 +155,217 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); -]]> - +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", "", "", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", "", "", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", "", "", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", "", "", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DownloadAsync with required parameters and parse the result. + +This sample shows how to call DownloadAsync and parse the result. ", "", "", "", "", new RequestContext()); +Response response = await client.DownloadAsync("", "", "", "", "", null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call DownloadAsync with all parameters and parse the result. +", "", "", "", "", null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call Download with required parameters and parse the result. + +This sample shows how to call Download and parse the result. ", "", "", "", "", new RequestContext()); +Response response = client.Download("", "", "", "", "", null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call Download with all parameters and parse the result. +", "", "", "", "", null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResourceAsync with required parameters and parse the result. + +This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResourceAsync and parse the result. ", "", "", "", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("insightId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("insightId").ToString()); } ]]> - +This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResourceAsync with all parameters and parse the result. +", "", "", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("insightId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); +} +]]> - -This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResource with required parameters and parse the result. + +This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResource and parse the result. ", "", "", "", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResource("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("insightId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("insightId").ToString()); } ]]> - +This sample shows how to call GetInsightAttachmentsByPartyIdModelIdAndResource with all parameters and parse the result. +", "", "", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("insightId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Insights.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Insights.xml index b71d2c46cc6e..3137ef3d7046 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Insights.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Insights.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -23,17 +35,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -48,47 +71,48 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", "", "", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - insightStartDateTime = "2022-05-10T18:57:31.2311892Z", - insightEndDateTime = "2022-05-10T18:57:31.2311892Z", - measurements = new { - key = new { - unit = "", - value = 123.45d, +TokenCredential credential = new DefaultAzureCredential(); +Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["modelVersion"] = "", + ["insightStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["insightEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["measurements"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", "", "", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -99,8 +123,8 @@ Console.WriteLine(result.GetProperty("modelVersion").ToString()); Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -110,48 +134,49 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", "", "", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - insightStartDateTime = "2022-05-10T18:57:31.2311892Z", - insightEndDateTime = "2022-05-10T18:57:31.2311892Z", - measurements = new { - key = new { - unit = "", - value = 123.45d, +TokenCredential credential = new DefaultAzureCredential(); +Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["modelVersion"] = "", + ["insightStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["insightEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["measurements"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", "", "", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -162,8 +187,8 @@ Console.WriteLine(result.GetProperty("modelVersion").ToString()); Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -173,18 +198,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetInsightAsync with required parameters and parse the result. + +This sample shows how to call GetInsightAsync and parse the result. +", "", "", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetInsightAsync with all parameters and parse the result. ", "", "", "", "", new RequestContext()); +Response response = await client.GetInsightAsync("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -195,8 +229,8 @@ Console.WriteLine(result.GetProperty("modelVersion").ToString()); Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -206,18 +240,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetInsight with required parameters and parse the result. + +This sample shows how to call GetInsight and parse the result. ", "", "", "", "", new RequestContext()); +Response response = client.GetInsight("", "", "", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetInsight with all parameters and parse the result. +", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -228,8 +271,8 @@ Console.WriteLine(result.GetProperty("modelVersion").ToString()); Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -239,112 +282,188 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", "", "", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", "", "", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", "", "", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", "", "", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetInsightsByPartyIdModelIdAndResourceAsync with required parameters and parse the result. + +This sample shows how to call GetInsightsByPartyIdModelIdAndResourceAsync and parse the result. ", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetInsightsByPartyIdModelIdAndResourceAsync("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("modelVersion").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetInsightsByPartyIdModelIdAndResourceAsync with all parameters and parse the result. +", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("modelVersion").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("insightStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("insightEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetInsightsByPartyIdModelIdAndResource with required parameters and parse the result. + +This sample shows how to call GetInsightsByPartyIdModelIdAndResource and parse the result. ", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetInsightsByPartyIdModelIdAndResource("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("modelVersion").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetInsightsByPartyIdModelIdAndResource with all parameters and parse the result. +", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("modelVersion").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("insightStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("insightEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", "", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -358,19 +477,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", "", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -384,8 +515,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ManagementZones.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ManagementZones.xml index 2dda16f0612b..f4fc26aefaa5 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ManagementZones.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ManagementZones.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -23,17 +35,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -48,17 +71,26 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetManagementZoneAsync with required parameters and parse the result. + +This sample shows how to call GetManagementZoneAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetManagementZoneAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetManagementZoneAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -76,18 +108,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetManagementZone with required parameters and parse the result. + +This sample shows how to call GetManagementZone and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetManagementZone with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetManagementZone("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -105,44 +146,43 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -160,44 +200,43 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -215,164 +254,338 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetManagementZonesAsync with required parameters and parse the result. + +This sample shows how to call GetManagementZonesAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetManagementZonesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetManagementZonesAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetManagementZones with required parameters and parse the result. + +This sample shows how to call GetManagementZones and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetManagementZones(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetManagementZones with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetManagementZonesByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetManagementZonesByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetManagementZonesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetManagementZonesByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetManagementZonesByPartyId with required parameters and parse the result. + +This sample shows how to call GetManagementZonesByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetManagementZonesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetManagementZonesByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -386,19 +599,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -412,8 +637,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml index d0fd140dd157..ad007e6e0e9e 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/ModelInference.xml @@ -2,13 +2,33 @@ - -This sample shows how to call GetBiomassModelJobAsync with required parameters and parse the result. + +This sample shows how to call GetBiomassModelJobAsync and parse the result. ", new RequestContext()); +Response response = await client.GetBiomassModelJobAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("modelVersion").ToString()); +Console.WriteLine(result.GetProperty("cropName").ToString()); +Console.WriteLine(result.GetProperty("plantingStartDateTime").ToString()); +Console.WriteLine(result.GetProperty("inferenceEndDateTime").ToString()); +Console.WriteLine(result.GetProperty("weatherExtensionId").ToString()); +Console.WriteLine(result.GetProperty("satelliteProvider").ToString()); +Console.WriteLine(result.GetProperty("satelliteSource").ToString()); +Console.WriteLine(result.GetProperty("imageResolution").ToString()); +Console.WriteLine(result.GetProperty("imageFormat").ToString()); +]]> +This sample shows how to call GetBiomassModelJobAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -35,18 +55,37 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetBiomassModelJob with required parameters and parse the result. + +This sample shows how to call GetBiomassModelJob and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("modelVersion").ToString()); +Console.WriteLine(result.GetProperty("cropName").ToString()); +Console.WriteLine(result.GetProperty("plantingStartDateTime").ToString()); +Console.WriteLine(result.GetProperty("inferenceEndDateTime").ToString()); +Console.WriteLine(result.GetProperty("weatherExtensionId").ToString()); +Console.WriteLine(result.GetProperty("satelliteProvider").ToString()); +Console.WriteLine(result.GetProperty("satelliteSource").ToString()); +Console.WriteLine(result.GetProperty("imageResolution").ToString()); +Console.WriteLine(result.GetProperty("imageFormat").ToString()); +]]> +This sample shows how to call GetBiomassModelJob with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetBiomassModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -73,18 +112,35 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorPlacementModelJobAsync with required parameters and parse the result. + +This sample shows how to call GetSensorPlacementModelJobAsync and parse the result. ", new RequestContext()); +Response response = await client.GetSensorPlacementModelJobAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("modelVersion").ToString()); +Console.WriteLine(result.GetProperty("inferenceStartDateTime").ToString()); +Console.WriteLine(result.GetProperty("inferenceEndDateTime").ToString()); +Console.WriteLine(result.GetProperty("satelliteProvider").ToString()); +Console.WriteLine(result.GetProperty("satelliteSource").ToString()); +Console.WriteLine(result.GetProperty("sensorType").ToString()); +Console.WriteLine(result.GetProperty("isRanked").ToString()); +]]> +This sample shows how to call GetSensorPlacementModelJobAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -109,18 +165,35 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorPlacementModelJob with required parameters and parse the result. + +This sample shows how to call GetSensorPlacementModelJob and parse the result. ", new RequestContext()); +Response response = client.GetSensorPlacementModelJob("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("modelVersion").ToString()); +Console.WriteLine(result.GetProperty("inferenceStartDateTime").ToString()); +Console.WriteLine(result.GetProperty("inferenceEndDateTime").ToString()); +Console.WriteLine(result.GetProperty("satelliteProvider").ToString()); +Console.WriteLine(result.GetProperty("satelliteSource").ToString()); +Console.WriteLine(result.GetProperty("sensorType").ToString()); +Console.WriteLine(result.GetProperty("isRanked").ToString()); +]]> +This sample shows how to call GetSensorPlacementModelJob with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -145,18 +218,40 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSoilMoistureModelJobAsync with required parameters and parse the result. + +This sample shows how to call GetSoilMoistureModelJobAsync and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); +Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); +Console.WriteLine(result.GetProperty("inferenceStartDateTime").ToString()); +Console.WriteLine(result.GetProperty("inferenceEndDateTime").ToString()); +Console.WriteLine(result.GetProperty("satelliteProvider").ToString()); +Console.WriteLine(result.GetProperty("satelliteSource").ToString()); +Console.WriteLine(result.GetProperty("imageResolution").ToString()); +Console.WriteLine(result.GetProperty("imageFormat").ToString()); +Console.WriteLine(result.GetProperty("modelVersion").ToString()); +Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("sensorMeasurement").ToString()); +Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("minProperty").ToString()); +Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("maxProperty").ToString()); +]]> +This sample shows how to call GetSoilMoistureModelJobAsync with all parameters and parse the result. ", new RequestContext()); +Response response = await client.GetSoilMoistureModelJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -186,18 +281,40 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSoilMoistureModelJob with required parameters and parse the result. + +This sample shows how to call GetSoilMoistureModelJob and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); +Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); +Console.WriteLine(result.GetProperty("inferenceStartDateTime").ToString()); +Console.WriteLine(result.GetProperty("inferenceEndDateTime").ToString()); +Console.WriteLine(result.GetProperty("satelliteProvider").ToString()); +Console.WriteLine(result.GetProperty("satelliteSource").ToString()); +Console.WriteLine(result.GetProperty("imageResolution").ToString()); +Console.WriteLine(result.GetProperty("imageFormat").ToString()); +Console.WriteLine(result.GetProperty("modelVersion").ToString()); +Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("sensorMeasurement").ToString()); +Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("minProperty").ToString()); +Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("maxProperty").ToString()); +]]> +This sample shows how to call GetSoilMoistureModelJob with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetSoilMoistureModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -227,34 +344,33 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateBiomassModelJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateBiomassModelJobAsync and parse the result. ", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", -}; - -var operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", +}); +Operation operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -268,33 +384,34 @@ Console.WriteLine(result.GetProperty("satelliteSource").ToString()); Console.WriteLine(result.GetProperty("imageResolution").ToString()); Console.WriteLine(result.GetProperty("imageFormat").ToString()); ]]> -This sample shows how to call CreateBiomassModelJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateBiomassModelJobAsync with all parameters and request content and parse the result. ", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -320,34 +437,33 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateBiomassModelJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateBiomassModelJob and parse the result. ", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", -}; - -var operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", +}); +Operation operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -361,33 +477,34 @@ Console.WriteLine(result.GetProperty("satelliteSource").ToString()); Console.WriteLine(result.GetProperty("imageResolution").ToString()); Console.WriteLine(result.GetProperty("imageFormat").ToString()); ]]> -This sample shows how to call CreateBiomassModelJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateBiomassModelJob with all parameters and request content and parse the result. ", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -413,32 +530,31 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateSensorPlacementModelJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateSensorPlacementModelJobAsync and parse the result. ", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, -}; - -var operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, +}); +Operation operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -450,31 +566,32 @@ Console.WriteLine(result.GetProperty("satelliteSource").ToString()); Console.WriteLine(result.GetProperty("sensorType").ToString()); Console.WriteLine(result.GetProperty("isRanked").ToString()); ]]> -This sample shows how to call CreateSensorPlacementModelJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateSensorPlacementModelJobAsync with all parameters and request content and parse the result. ", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -498,32 +615,31 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateSensorPlacementModelJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateSensorPlacementModelJob and parse the result. ", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, -}; - -var operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, +}); +Operation operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -535,31 +651,32 @@ Console.WriteLine(result.GetProperty("satelliteSource").ToString()); Console.WriteLine(result.GetProperty("sensorType").ToString()); Console.WriteLine(result.GetProperty("isRanked").ToString()); ]]> -This sample shows how to call CreateSensorPlacementModelJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateSensorPlacementModelJob with all parameters and request content and parse the result. ", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, - name = "", - description = "", - properties = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -583,39 +700,39 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateSoilMoistureModelJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateSoilMoistureModelJobAsync and parse the result. ", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() + { + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, -}; - -var operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -632,38 +749,40 @@ Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("sensorMeas Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("minProperty").ToString()); Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("maxProperty").ToString()); ]]> -This sample shows how to call CreateSoilMoistureModelJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateSoilMoistureModelJobAsync with all parameters and request content and parse the result. ", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() + { + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, - name = "", - description = "", - properties = new { - key = new {}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -692,39 +811,39 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateSoilMoistureModelJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateSoilMoistureModelJob and parse the result. ", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() + { + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, -}; - -var operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -741,38 +860,40 @@ Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("sensorMeas Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("minProperty").ToString()); Console.WriteLine(result.GetProperty("sensorDefinition").GetProperty("maxProperty").ToString()); ]]> -This sample shows how to call CreateSoilMoistureModelJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateSoilMoistureModelJob with all parameters and request content and parse the result. ", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", +TokenCredential credential = new DefaultAzureCredential(); +ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() + { + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, - name = "", - description = "", - properties = new { - key = new {}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -801,9 +922,8 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/NutrientAnalyses.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/NutrientAnalyses.xml index 54886a2570e9..f1072cf18c1b 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/NutrientAnalyses.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/NutrientAnalyses.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetNutrientAnalysisAsync with required parameters and parse the result. + +This sample shows how to call GetNutrientAnalysisAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetNutrientAnalysisAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNutrientAnalysisAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -33,18 +43,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetNutrientAnalysis with required parameters and parse the result. + +This sample shows how to call GetNutrientAnalysis and parse the result. ", "", new RequestContext()); +Response response = client.GetNutrientAnalysis("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNutrientAnalysis with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -69,55 +88,56 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - parentType = "PlantTissueAnalysis", - unit = "", - value = 123.45d, - referenceValueLow = 123.45d, - referenceValueHigh = 123.45d, - classification = "", - recommendation = "", - products = new[] { - new { - rate = "", - instruction = "", - product = "", - } - }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["parentId"] = "", + ["parentType"] = "PlantTissueAnalysis", + ["unit"] = "", + ["value"] = 123.45, + ["referenceValueLow"] = 123.45, + ["referenceValueHigh"] = 123.45, + ["classification"] = "", + ["recommendation"] = "", + ["products"] = new List() +{ +new Dictionary() +{ +["rate"] = "", +["instruction"] = "", +["product"] = "", +} +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -142,55 +162,56 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - parentType = "PlantTissueAnalysis", - unit = "", - value = 123.45d, - referenceValueLow = 123.45d, - referenceValueHigh = 123.45d, - classification = "", - recommendation = "", - products = new[] { - new { - rate = "", - instruction = "", - product = "", - } - }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["parentId"] = "", + ["parentType"] = "PlantTissueAnalysis", + ["unit"] = "", + ["value"] = 123.45, + ["referenceValueLow"] = 123.45, + ["referenceValueHigh"] = 123.45, + ["classification"] = "", + ["recommendation"] = "", + ["products"] = new List() +{ +new Dictionary() +{ +["rate"] = "", +["instruction"] = "", +["product"] = "", +} +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -215,181 +236,306 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetNutrientAnalysesAsync with required parameters and parse the result. + +This sample shows how to call GetNutrientAnalysesAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetNutrientAnalysesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetNutrientAnalysesAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetNutrientAnalyses with required parameters and parse the result. + +This sample shows how to call GetNutrientAnalyses and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetNutrientAnalyses(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetNutrientAnalyses with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetNutrientAnalysesByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetNutrientAnalysesByPartyIdAsync and parse the result. ", "", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetNutrientAnalysesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetNutrientAnalysesByPartyIdAsync with all parameters and parse the result. +", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetNutrientAnalysesByPartyId with required parameters and parse the result. + +This sample shows how to call GetNutrientAnalysesByPartyId and parse the result. ", "", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetNutrientAnalysesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetNutrientAnalysesByPartyId with all parameters and parse the result. +", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/OAuthProviders.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/OAuthProviders.xml index 1d3e2259406c..5f83a3923716 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/OAuthProviders.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/OAuthProviders.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetOAuthProviderAsync with required parameters and parse the result. + +This sample shows how to call GetOAuthProviderAsync and parse the result. ", new RequestContext()); +Response response = await client.GetOAuthProviderAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetOAuthProviderAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -23,18 +33,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetOAuthProvider with required parameters and parse the result. + +This sample shows how to call GetOAuthProvider and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetOAuthProvider with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetOAuthProvider("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -49,42 +68,41 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - appSecret = "", - apiKey = "", - isProductionApp = true, - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["appId"] = "", + ["appSecret"] = "", + ["apiKey"] = "", + ["isProductionApp"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -99,42 +117,41 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - appSecret = "", - apiKey = "", - isProductionApp = true, - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["appId"] = "", + ["appSecret"] = "", + ["apiKey"] = "", + ["isProductionApp"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -149,42 +166,65 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); @@ -201,18 +241,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); @@ -229,74 +278,128 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetOAuthProvidersAsync with required parameters and parse the result. + +This sample shows how to call GetOAuthProvidersAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetOAuthProvidersAsync(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("appId").ToString()); - Console.WriteLine(result.GetProperty("appSecret").ToString()); - Console.WriteLine(result.GetProperty("apiKey").ToString()); - Console.WriteLine(result.GetProperty("isProductionApp").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetOAuthProvidersAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("appId").ToString()); + Console.WriteLine(result[0].GetProperty("appSecret").ToString()); + Console.WriteLine(result[0].GetProperty("apiKey").ToString()); + Console.WriteLine(result[0].GetProperty("isProductionApp").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetOAuthProviders with required parameters and parse the result. + +This sample shows how to call GetOAuthProviders and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetOAuthProviders(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("appId").ToString()); - Console.WriteLine(result.GetProperty("appSecret").ToString()); - Console.WriteLine(result.GetProperty("apiKey").ToString()); - Console.WriteLine(result.GetProperty("isProductionApp").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetOAuthProviders with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("appId").ToString()); + Console.WriteLine(result[0].GetProperty("appSecret").ToString()); + Console.WriteLine(result[0].GetProperty("apiKey").ToString()); + Console.WriteLine(result[0].GetProperty("isProductionApp").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; -var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", new RequestContext()); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -312,20 +415,30 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -341,9 +454,8 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Parties.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Parties.xml index 7efea3a3cf27..514db9028dbb 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Parties.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Parties.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetPartyAsync with required parameters and parse the result. + +This sample shows how to call GetPartyAsync and parse the result. ", new RequestContext()); +Response response = await client.GetPartyAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPartyAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -21,18 +31,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetParty with required parameters and parse the result. + +This sample shows how to call GetParty and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetParty with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetParty("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -45,40 +64,39 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -91,40 +109,39 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -137,42 +154,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -187,17 +229,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -212,69 +265,125 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetPartiesAsync with required parameters and parse the result. + +This sample shows how to call GetPartiesAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPartiesAsync(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPartiesAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetParties with required parameters and parse the result. + +This sample shows how to call GetParties and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetParties(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetParties with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -288,19 +397,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -314,8 +435,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantTissueAnalyses.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantTissueAnalyses.xml index 1cd8dbe62cd4..7c3f27b49d3c 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantTissueAnalyses.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantTissueAnalyses.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetPlantTissueAnalysisAsync with required parameters and parse the result. + +This sample shows how to call GetPlantTissueAnalysisAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetPlantTissueAnalysisAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPlantTissueAnalysisAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -40,18 +50,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetPlantTissueAnalysis with required parameters and parse the result. + +This sample shows how to call GetPlantTissueAnalysis and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPlantTissueAnalysis with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetPlantTissueAnalysis("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -83,59 +102,59 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - cropId = "", - cropProductId = "", - seasonId = "", - plantingDateTime = "2022-05-10T18:57:31.2311892Z", - growthStage = "", - plantPart = "", - plantPosition = "", - plantAppearance = "", - sampleCollectionCondition = "", - sampleCollectionDateTime = "2022-05-10T18:57:31.2311892Z", - sampleReceivedDateTime = "2022-05-10T18:57:31.2311892Z", - sampleTestResultDateTime = "2022-05-10T18:57:31.2311892Z", - labDetails = new { - code = "", - name = "", - description = "", - address = "
", +TokenCredential credential = new DefaultAzureCredential(); +PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["fieldId"] = "", + ["cropId"] = "", + ["cropProductId"] = "", + ["seasonId"] = "", + ["plantingDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["growthStage"] = "", + ["plantPart"] = "", + ["plantPosition"] = "", + ["plantAppearance"] = "", + ["sampleCollectionCondition"] = "", + ["sampleCollectionDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleReceivedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleTestResultDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["labDetails"] = new Dictionary() + { + ["code"] = "", + ["name"] = "", + ["description"] = "", + ["address"] = "
", }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -167,59 +186,59 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - cropId = "", - cropProductId = "", - seasonId = "", - plantingDateTime = "2022-05-10T18:57:31.2311892Z", - growthStage = "", - plantPart = "", - plantPosition = "", - plantAppearance = "", - sampleCollectionCondition = "", - sampleCollectionDateTime = "2022-05-10T18:57:31.2311892Z", - sampleReceivedDateTime = "2022-05-10T18:57:31.2311892Z", - sampleTestResultDateTime = "2022-05-10T18:57:31.2311892Z", - labDetails = new { - code = "", - name = "", - description = "", - address = "
", +TokenCredential credential = new DefaultAzureCredential(); +PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["fieldId"] = "", + ["cropId"] = "", + ["cropProductId"] = "", + ["seasonId"] = "", + ["plantingDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["growthStage"] = "", + ["plantPart"] = "", + ["plantPosition"] = "", + ["plantAppearance"] = "", + ["sampleCollectionCondition"] = "", + ["sampleCollectionDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleReceivedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleTestResultDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["labDetails"] = new Dictionary() + { + ["code"] = "", + ["name"] = "", + ["description"] = "", + ["address"] = "
", }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -251,42 +270,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -301,17 +345,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -326,195 +381,343 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetPlantTissueAnalysesByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetPlantTissueAnalysesByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPlantTissueAnalysesByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPlantTissueAnalysesByPartyId with required parameters and parse the result. + +This sample shows how to call GetPlantTissueAnalysesByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPlantTissueAnalysesByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPlantTissueAnalysesAsync with required parameters and parse the result. + +This sample shows how to call GetPlantTissueAnalysesAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPlantTissueAnalysesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPlantTissueAnalysesAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPlantTissueAnalyses with required parameters and parse the result. + +This sample shows how to call GetPlantTissueAnalyses and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetPlantTissueAnalyses(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPlantTissueAnalyses with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; -var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -528,19 +731,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -554,8 +769,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantingData.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantingData.xml index 2e6392a6a889..41ea7520f562 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantingData.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PlantingData.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetPlantingDataAsync with required parameters and parse the result. + +This sample shows how to call GetPlantingDataAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetPlantingDataAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPlantingDataAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -42,18 +52,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetPlantingData with required parameters and parse the result. + +This sample shows how to call GetPlantingData and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPlantingData with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetPlantingData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -87,77 +106,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - plantingProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["avgPlantingRate"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["totalMaterial"] = null +, + ["avgMaterial"] = null +, + ["plantingProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalMaterial"] = null +, +["avgMaterial"] = null +, +} +}, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -191,77 +200,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - plantingProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["avgPlantingRate"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["totalMaterial"] = null +, + ["avgMaterial"] = null +, + ["plantingProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalMaterial"] = null +, +["avgMaterial"] = null +, +} +}, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -295,42 +294,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -345,17 +369,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -370,203 +405,327 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetAllPlantingDataByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetAllPlantingDataByPartyIdAsync and parse the result. ", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllPlantingDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllPlantingDataByPartyIdAsync with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllPlantingDataByPartyId with required parameters and parse the result. + +This sample shows how to call GetAllPlantingDataByPartyId and parse the result. ", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllPlantingDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllPlantingDataByPartyId with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllPlantingDataAsync with required parameters and parse the result. + +This sample shows how to call GetAllPlantingDataAsync and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllPlantingDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllPlantingDataAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllPlantingData with required parameters and parse the result. + +This sample shows how to call GetAllPlantingData and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllPlantingData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllPlantingData with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -580,19 +739,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -606,8 +777,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PrescriptionMaps.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PrescriptionMaps.xml index 05e210756269..382047f3ca30 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PrescriptionMaps.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/PrescriptionMaps.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetPrescriptionMapAsync with required parameters and parse the result. + +This sample shows how to call GetPrescriptionMapAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetPrescriptionMapAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPrescriptionMapAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -26,18 +36,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetPrescriptionMap with required parameters and parse the result. + +This sample shows how to call GetPrescriptionMap and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPrescriptionMap with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetPrescriptionMap("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -55,44 +74,43 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -110,44 +128,43 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -165,42 +182,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -215,17 +257,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -240,139 +293,299 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetPrescriptionMapsByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetPrescriptionMapsByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPrescriptionMapsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptionMapsByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPrescriptionMapsByPartyId with required parameters and parse the result. + +This sample shows how to call GetPrescriptionMapsByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetPrescriptionMapsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptionMapsByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPrescriptionMapsAsync with required parameters and parse the result. + +This sample shows how to call GetPrescriptionMapsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPrescriptionMapsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptionMapsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPrescriptionMaps with required parameters and parse the result. + +This sample shows how to call GetPrescriptionMaps and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetPrescriptionMaps(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptionMaps with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -386,19 +599,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -412,8 +637,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Prescriptions.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Prescriptions.xml index c05d9c8fe34c..5609ed6d0a14 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Prescriptions.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Prescriptions.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetPrescriptionAsync with required parameters and parse the result. + +This sample shows how to call GetPrescriptionAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetPrescriptionAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPrescriptionAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -16,8 +26,8 @@ Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -28,18 +38,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetPrescription with required parameters and parse the result. + +This sample shows how to call GetPrescription and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPrescription with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetPrescription("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -47,8 +66,8 @@ Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -59,50 +78,51 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - productCode = "", - productName = "", - type = "", - measurements = new { - key = new { - unit = "", - value = 123.45d, +TokenCredential credential = new DefaultAzureCredential(); +Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["prescriptionMapId"] = "", + ["productCode"] = "", + ["productName"] = "", + ["type"] = "", + ["measurements"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -110,8 +130,8 @@ Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -122,50 +142,51 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - productCode = "", - productName = "", - type = "", - measurements = new { - key = new { - unit = "", - value = 123.45d, +TokenCredential credential = new DefaultAzureCredential(); +Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["prescriptionMapId"] = "", + ["productCode"] = "", + ["productName"] = "", + ["type"] = "", + ["measurements"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -173,8 +194,8 @@ Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -185,42 +206,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -235,17 +281,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -260,147 +317,307 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetPrescriptionsByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetPrescriptionsByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPrescriptionsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptionsByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPrescriptionsByPartyId with required parameters and parse the result. + +This sample shows how to call GetPrescriptionsByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetPrescriptionsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptionsByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPrescriptionsAsync with required parameters and parse the result. + +This sample shows how to call GetPrescriptionsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPrescriptionsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptionsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetPrescriptions with required parameters and parse the result. + +This sample shows how to call GetPrescriptions and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetPrescriptions(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPrescriptions with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -414,19 +631,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -440,8 +669,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Scenes.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Scenes.xml index 0e4a85942567..162833be3a81 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Scenes.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Scenes.xml @@ -2,49 +2,89 @@ - -This sample shows how to call DownloadAsync with required parameters and parse the result. + +This sample shows how to call DownloadAsync and parse the result. ", new RequestContext()); +Response response = await client.DownloadAsync("", null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call DownloadAsync with all parameters and parse the result. +", null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call Download with required parameters and parse the result. + +This sample shows how to call Download and parse the result. ", new RequestContext()); +Response response = client.Download("", null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call Download with all parameters and parse the result. +", null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call GetSatelliteDataIngestionJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetSatelliteDataIngestionJobDetailsAsync and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("source").ToString()); +]]> +This sample shows how to call GetSatelliteDataIngestionJobDetailsAsync with all parameters and parse the result. ", new RequestContext()); +Response response = await client.GetSatelliteDataIngestionJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -69,18 +109,31 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSatelliteDataIngestionJobDetails with required parameters and parse the result. + +This sample shows how to call GetSatelliteDataIngestionJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("source").ToString()); +]]> +This sample shows how to call GetSatelliteDataIngestionJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetSatelliteDataIngestionJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -105,23 +158,22 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call SearchFeaturesAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call SearchFeaturesAsync and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", +}); +Response response = await client.SearchFeaturesAsync("Sentinel_2_L2A", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -130,37 +182,44 @@ Console.WriteLine(result.GetProperty("features")[0].GetProperty("type").ToString Console.WriteLine(result.GetProperty("features")[0].GetProperty("properties").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("href").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); ]]> -This sample shows how to call SearchFeaturesAsync with all parameters and request content, and how to parse the result. +This sample shows how to call SearchFeaturesAsync with all parameters and request content and parse the result. " - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -Response response = await client.SearchFeaturesAsync("", RequestContent.Create(data), 1234, 1234); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["intersects"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", + }, + ["bbox"] = new List() +{ +123.45 +}, + ["featureIds"] = new List() +{ +"" +}, +}); +Response response = await client.SearchFeaturesAsync("Sentinel_2_L2A", content, maxpagesize: 1234, skip: 1234); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -174,29 +233,28 @@ Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetP Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("collection").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - +]]> - -This sample shows how to call SearchFeatures with required parameters and request content, and how to parse the result. + +This sample shows how to call SearchFeatures and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", +}); +Response response = client.SearchFeatures("Sentinel_2_L2A", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -205,37 +263,44 @@ Console.WriteLine(result.GetProperty("features")[0].GetProperty("type").ToString Console.WriteLine(result.GetProperty("features")[0].GetProperty("properties").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("href").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); ]]> -This sample shows how to call SearchFeatures with all parameters and request content, and how to parse the result. +This sample shows how to call SearchFeatures with all parameters and request content and parse the result. " - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); -Response response = client.SearchFeatures("", RequestContent.Create(data), 1234, 1234); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["intersects"] = new Dictionary() + { + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", + }, + ["bbox"] = new List() +{ +123.45 +}, + ["featureIds"] = new List() +{ +"" +}, +}); +Response response = client.SearchFeatures("Sentinel_2_L2A", content, maxpagesize: 1234, skip: 1234); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -249,24 +314,39 @@ Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetP Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("collection").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - +]]> - -This sample shows how to call GetStacFeatureAsync with required parameters and parse the result. + +This sample shows how to call GetStacFeatureAsync and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("stacVersion").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("properties").ToString()); +Console.WriteLine(result.GetProperty("links")[0].GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +]]> +This sample shows how to call GetStacFeatureAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetStacFeatureAsync("Sentinel_2_L2A", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("stacVersion").ToString()); @@ -280,23 +360,38 @@ Console.WriteLine(result.GetProperty("links")[0].GetProperty("href").ToString()) Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("collection").ToString()); -]]> - +]]> - -This sample shows how to call GetStacFeature with required parameters and parse the result. + +This sample shows how to call GetStacFeature and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("stacVersion").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("properties").ToString()); +Console.WriteLine(result.GetProperty("links")[0].GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +]]> +This sample shows how to call GetStacFeature with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetStacFeature("Sentinel_2_L2A", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("stacVersion").ToString()); @@ -310,91 +405,128 @@ Console.WriteLine(result.GetProperty("links")[0].GetProperty("href").ToString()) Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("collection").ToString()); -]]> - +]]> - -This sample shows how to call GetScenesAsync with required parameters and parse the result. + +This sample shows how to call GetScenesAsync and parse the result. ", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new Double[]{3.14}, new String[]{""}, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetScenesAsync("", "", "", "", null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sceneDateTime").ToString()); - Console.WriteLine(result.GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); - Console.WriteLine(result.GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("cloudCoverPercentage").ToString()); - Console.WriteLine(result.GetProperty("darkPixelPercentage").ToString()); - Console.WriteLine(result.GetProperty("ndviMedianValue").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetScenesAsync with all parameters and parse the result. +", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +123.45 +}, new List() +{ +"" +}, 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("sceneDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); + Console.WriteLine(result[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCoverPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("darkPixelPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("ndviMedianValue").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); +} +]]> - -This sample shows how to call GetScenes with required parameters and parse the result. + +This sample shows how to call GetScenes and parse the result. ", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new Double[]{3.14}, new String[]{""}, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetScenes("", "", "", "", null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sceneDateTime").ToString()); - Console.WriteLine(result.GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); - Console.WriteLine(result.GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("cloudCoverPercentage").ToString()); - Console.WriteLine(result.GetProperty("darkPixelPercentage").ToString()); - Console.WriteLine(result.GetProperty("ndviMedianValue").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetScenes with all parameters and parse the result. +", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +123.45 +}, new List() +{ +"" +}, 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("sceneDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); + Console.WriteLine(result[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCoverPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("darkPixelPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("ndviMedianValue").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); +} +]]> - -This sample shows how to call CreateSatelliteDataIngestionJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateSatelliteDataIngestionJobAsync and parse the result. ", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - source = "Sentinel_2_L2A", -}; - -var operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["source"] = "Sentinel_2_L2A", +}); +Operation operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -402,39 +534,44 @@ Console.WriteLine(result.GetProperty("startDateTime").ToString()); Console.WriteLine(result.GetProperty("endDateTime").ToString()); Console.WriteLine(result.GetProperty("source").ToString()); ]]> -This sample shows how to call CreateSatelliteDataIngestionJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateSatelliteDataIngestionJobAsync with all parameters and request content and parse the result. ", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - provider = "Microsoft", - source = "Sentinel_2_L2A", - data = new { - imageNames = new[] { - "" - }, - imageFormats = new[] { - "" - }, - imageResolutions = new[] { - 123.45d - }, +TokenCredential credential = new DefaultAzureCredential(); +Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["provider"] = "Microsoft", + ["source"] = "Sentinel_2_L2A", + ["data"] = new Dictionary() + { + ["imageNames"] = new List() +{ +"" +}, + ["imageFormats"] = new List() +{ +"" +}, + ["imageResolutions"] = new List() +{ +123.45 +}, }, - name = "", - description = "", - properties = new { - key = new {}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -458,28 +595,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateSatelliteDataIngestionJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateSatelliteDataIngestionJob and parse the result. ", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - source = "Sentinel_2_L2A", -}; - -var operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["source"] = "Sentinel_2_L2A", +}); +Operation operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -487,39 +623,44 @@ Console.WriteLine(result.GetProperty("startDateTime").ToString()); Console.WriteLine(result.GetProperty("endDateTime").ToString()); Console.WriteLine(result.GetProperty("source").ToString()); ]]> -This sample shows how to call CreateSatelliteDataIngestionJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateSatelliteDataIngestionJob with all parameters and request content and parse the result. ", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - provider = "Microsoft", - source = "Sentinel_2_L2A", - data = new { - imageNames = new[] { - "" - }, - imageFormats = new[] { - "" - }, - imageResolutions = new[] { - 123.45d - }, +TokenCredential credential = new DefaultAzureCredential(); +Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["provider"] = "Microsoft", + ["source"] = "Sentinel_2_L2A", + ["data"] = new Dictionary() + { + ["imageNames"] = new List() +{ +"" +}, + ["imageFormats"] = new List() +{ +"" +}, + ["imageResolutions"] = new List() +{ +123.45 +}, }, - name = "", - description = "", - properties = new { - key = new {}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -543,9 +684,8 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SeasonalFields.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SeasonalFields.xml index 728fdf0b5778..3f5592b254a2 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SeasonalFields.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SeasonalFields.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetSeasonalFieldAsync with required parameters and parse the result. + +This sample shows how to call GetSeasonalFieldAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetSeasonalFieldAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSeasonalFieldAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -27,18 +37,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSeasonalField with required parameters and parse the result. + +This sample shows how to call GetSeasonalField and parse the result. ", "", new RequestContext()); +Response response = client.GetSeasonalField("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSeasonalField with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -57,47 +76,47 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - fieldId = "", - seasonId = "", - cropProductIds = new[] { - "" - }, - cropId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["farmId"] = "", + ["fieldId"] = "", + ["seasonId"] = "", + ["cropProductIds"] = new List() +{ +"" +}, + ["cropId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -116,47 +135,47 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - fieldId = "", - seasonId = "", - cropProductIds = new[] { - "" - }, - cropId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["farmId"] = "", + ["fieldId"] = "", + ["seasonId"] = "", + ["cropProductIds"] = new List() +{ +"" +}, + ["cropId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -175,42 +194,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -225,17 +269,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -250,143 +305,303 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetSeasonalFieldsByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetSeasonalFieldsByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSeasonalFieldsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSeasonalFieldsByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSeasonalFieldsByPartyId with required parameters and parse the result. + +This sample shows how to call GetSeasonalFieldsByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSeasonalFieldsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSeasonalFieldsByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSeasonalFieldsAsync with required parameters and parse the result. + +This sample shows how to call GetSeasonalFieldsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSeasonalFieldsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSeasonalFieldsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSeasonalFields with required parameters and parse the result. + +This sample shows how to call GetSeasonalFields and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSeasonalFields(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSeasonalFields with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -400,19 +615,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; -var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -426,8 +653,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Seasons.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Seasons.xml index 7c8a88622cdd..3f6fa30a91c9 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Seasons.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Seasons.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetSeasonAsync with required parameters and parse the result. + +This sample shows how to call GetSeasonAsync and parse the result. ", new RequestContext()); +Response response = await client.GetSeasonAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSeasonAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -25,18 +35,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSeason with required parameters and parse the result. + +This sample shows how to call GetSeason and parse the result. ", new RequestContext()); +Response response = client.GetSeason("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSeason with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -53,44 +72,43 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. -", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["year"] = 1234, + ["geographicIdentifier"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -107,44 +125,43 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. -", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["year"] = 1234, + ["geographicIdentifier"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -161,91 +178,154 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetSeasonsAsync with required parameters and parse the result. + +This sample shows how to call GetSeasonsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSeasonsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("year").ToString()); - Console.WriteLine(result.GetProperty("geographicIdentifier").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSeasonsAsync with all parameters and parse the result. +() +{ +1234 +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("year").ToString()); + Console.WriteLine(result[0].GetProperty("geographicIdentifier").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSeasons with required parameters and parse the result. + +This sample shows how to call GetSeasons and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSeasons(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("year").ToString()); - Console.WriteLine(result.GetProperty("geographicIdentifier").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSeasons with all parameters and parse the result. +() +{ +1234 +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("year").ToString()); + Console.WriteLine(result[0].GetProperty("geographicIdentifier").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorDataModels.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorDataModels.xml index 3a280a2ff409..713d9982c783 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorDataModels.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorDataModels.xml @@ -2,64 +2,70 @@ - -This sample shows how to call CreateOrUpdateAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. () +{ + ["measures"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["dataType"] = "Bool", }, }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - manufacturer = "", - productCode = "", - measures = new { - key = new { - description = "", - dataType = "Bool", - type = "", - unit = "", - properties = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["measures"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["description"] = "", + ["dataType"] = "Bool", + ["type"] = "", + ["unit"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -70,69 +76,74 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. () +{ + ["measures"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["dataType"] = "Bool", }, }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - manufacturer = "", - productCode = "", - measures = new { - key = new { - description = "", - dataType = "Bool", - type = "", - unit = "", - properties = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["measures"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["description"] = "", + ["dataType"] = "Bool", + ["type"] = "", + ["unit"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -143,28 +154,37 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorDataModelAsync with required parameters and parse the result. + +This sample shows how to call GetSensorDataModelAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +]]> +This sample shows how to call GetSensorDataModelAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GetSensorDataModelAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -175,28 +195,37 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorDataModel with required parameters and parse the result. + +This sample shows how to call GetSensorDataModel and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +]]> +This sample shows how to call GetSensorDataModel with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetSensorDataModel("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -207,99 +236,156 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetSensorDataModelsAsync with required parameters and parse the result. + +This sample shows how to call GetSensorDataModelsAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSensorDataModelsAsync("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } ]]> - +This sample shows how to call GetSensorDataModelsAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSensorDataModels with required parameters and parse the result. + +This sample shows how to call GetSensorDataModels and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSensorDataModels("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } ]]> - +This sample shows how to call GetSensorDataModels with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorEvents.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorEvents.xml index cb0c84b3fef2..b2d96bf4d959 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorEvents.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorEvents.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetSensorEventsAsync with required parameters and parse the result. + +This sample shows how to call GetSensorEventsAsync and parse the result. ", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, true, new RequestContext()); +Response response = await client.GetSensorEventsAsync("", "", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].ToString()); +]]> +This sample shows how to call GetSensorEventsAsync with all parameters and parse the result. +", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("sensorId").ToString()); @@ -17,20 +27,29 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("partyId").ToString Console.WriteLine(result.GetProperty("value")[0].GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("eventDateTime").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("ingestionDateTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("skipToken").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - +]]> - -This sample shows how to call GetSensorEvents with required parameters and parse the result. + +This sample shows how to call GetSensorEvents and parse the result. ", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, true, new RequestContext()); +Response response = client.GetSensorEvents("", "", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].ToString()); +]]> +This sample shows how to call GetSensorEvents with all parameters and parse the result. +", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("sensorId").ToString()); @@ -39,11 +58,10 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("partyId").ToString Console.WriteLine(result.GetProperty("value")[0].GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("eventDateTime").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("ingestionDateTime").ToString()); -Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("skipToken").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorMappings.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorMappings.xml index bbc5e42d2e77..04a0143953e2 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorMappings.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorMappings.xml @@ -2,38 +2,38 @@ - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. -", - sensorPartnerId = "", - partyId = "", - boundaryId = "", - status = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["sensorId"] = "", + ["sensorPartnerId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -49,43 +49,42 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. -", - sensorPartnerId = "", - partyId = "", - boundaryId = "", - status = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["sensorId"] = "", + ["sensorPartnerId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -101,18 +100,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorMappingAsync with required parameters and parse the result. + +This sample shows how to call GetSensorMappingAsync and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSensorMappingAsync with all parameters and parse the result. ", new RequestContext()); +Response response = await client.GetSensorMappingAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -128,18 +136,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorMapping with required parameters and parse the result. + +This sample shows how to call GetSensorMapping and parse the result. ", new RequestContext()); +Response response = client.GetSensorMapping("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSensorMapping with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -155,89 +172,170 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. "); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetSensorMappingsAsync with required parameters and parse the result. + +This sample shows how to call GetSensorMappingsAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSensorMappingsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSensorMappingsAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("sensorId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSensorMappings with required parameters and parse the result. + +This sample shows how to call GetSensorMappings and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSensorMappings(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSensorMappings with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("sensorId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorPartnerIntegrations.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorPartnerIntegrations.xml index bf99c3eb3df4..c9815e558fcb 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorPartnerIntegrations.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SensorPartnerIntegrations.xml @@ -2,35 +2,35 @@ - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - status = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -45,40 +45,39 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - status = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["partyId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -93,18 +92,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorPartnerIntegrationAsync with required parameters and parse the result. + +This sample shows how to call GetSensorPartnerIntegrationAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetSensorPartnerIntegrationAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSensorPartnerIntegrationAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -119,18 +127,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorPartnerIntegration with required parameters and parse the result. + +This sample shows how to call GetSensorPartnerIntegration and parse the result. ", "", new RequestContext()); +Response response = client.GetSensorPartnerIntegration("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSensorPartnerIntegration with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -145,149 +162,254 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call CheckConsentAsync with required parameters and parse the result. + +This sample shows how to call CheckConsentAsync and parse the result. +", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CheckConsentAsync with all parameters and parse the result. ", "", "", new RequestContext()); +Response response = await client.CheckConsentAsync("", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consented").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("integrationId").ToString()); -]]> - +]]> - -This sample shows how to call CheckConsent with required parameters and parse the result. + +This sample shows how to call CheckConsent and parse the result. +", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CheckConsent with all parameters and parse the result. ", "", "", new RequestContext()); +Response response = client.CheckConsent("", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consented").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("integrationId").ToString()); -]]> - +]]> - -This sample shows how to call GenerateConsentLinkAsync with required parameters and parse the result. + +This sample shows how to call GenerateConsentLinkAsync and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GenerateConsentLinkAsync with all parameters and parse the result. ", "", new RequestContext()); +Response response = await client.GenerateConsentLinkAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consentLink").ToString()); Console.WriteLine(result.GetProperty("consentExpiryDateTime").ToString()); -]]> - +]]> - -This sample shows how to call GenerateConsentLink with required parameters and parse the result. + +This sample shows how to call GenerateConsentLink and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GenerateConsentLink with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GenerateConsentLink("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consentLink").ToString()); Console.WriteLine(result.GetProperty("consentExpiryDateTime").ToString()); -]]> - +]]> - -This sample shows how to call GetSensorPartnerIntegrationsAsync with required parameters and parse the result. + +This sample shows how to call GetSensorPartnerIntegrationsAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSensorPartnerIntegrationsAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSensorPartnerIntegrationsAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSensorPartnerIntegrations with required parameters and parse the result. + +This sample shows how to call GetSensorPartnerIntegrations and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSensorPartnerIntegrations("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSensorPartnerIntegrations with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Sensors.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Sensors.xml index 89c6bcfa03c7..76cd8e79a8ad 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Sensors.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Sensors.xml @@ -2,50 +2,53 @@ - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - integrationId = "", - hardwareId = "", - deviceId = "", - type = "", - location = new { - latitude = 123.45d, - longitude = 123.45d, - }, - port = new { - name = "", - type = "", +TokenCredential credential = new DefaultAzureCredential(); +Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["sensorDataModelId"] = "", + ["integrationId"] = "", + ["hardwareId"] = "", + ["deviceId"] = "", + ["type"] = "", + ["location"] = new Dictionary() + { + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - depthInMeters = new[] { - 123.45d + ["port"] = new Dictionary() + { + ["name"] = "", + ["type"] = "", }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["depthInMeters"] = new List() +{ +123.45 +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -68,55 +71,57 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - integrationId = "", - hardwareId = "", - deviceId = "", - type = "", - location = new { - latitude = 123.45d, - longitude = 123.45d, - }, - port = new { - name = "", - type = "", +TokenCredential credential = new DefaultAzureCredential(); +Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["sensorDataModelId"] = "", + ["integrationId"] = "", + ["hardwareId"] = "", + ["deviceId"] = "", + ["type"] = "", + ["location"] = new Dictionary() + { + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - depthInMeters = new[] { - 123.45d + ["port"] = new Dictionary() + { + ["name"] = "", + ["type"] = "", }, - status = "", - name = "", - description = "", - properties = new { - key = new {}, + ["depthInMeters"] = new List() +{ +123.45 +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -139,18 +144,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensorAsync with required parameters and parse the result. + +This sample shows how to call GetSensorAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetSensorAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSensorAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -173,18 +187,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetSensor with required parameters and parse the result. + +This sample shows how to call GetSensor and parse the result. ", "", new RequestContext()); +Response response = client.GetSensor("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetSensor with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -207,171 +230,290 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetConnectionStringAsync with required parameters and parse the result. + +This sample shows how to call GetConnectionStringAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetConnectionStringAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetConnectionStringAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); Console.WriteLine(result.GetProperty("secondaryDeviceConnectionString").ToString()); -]]> - +]]> - -This sample shows how to call GetConnectionString with required parameters and parse the result. + +This sample shows how to call GetConnectionString and parse the result. +", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetConnectionString with all parameters and parse the result. ", "", new RequestContext()); +Response response = client.GetConnectionString("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); Console.WriteLine(result.GetProperty("secondaryDeviceConnectionString").ToString()); -]]> - +]]> - -This sample shows how to call RenewConnectionStringAsync with required parameters and request content and parse the result. + +This sample shows how to call RenewConnectionStringAsync and parse the result. () +{ + ["connectionStringType"] = "Primary", +}); +Response response = await client.RenewConnectionStringAsync("", "", content); -var data = new { - connectionStringType = "Primary", -}; +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call RenewConnectionStringAsync with all parameters and request content and parse the result. +", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["connectionStringType"] = "Primary", +}); +Response response = await client.RenewConnectionStringAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); Console.WriteLine(result.GetProperty("secondaryDeviceConnectionString").ToString()); -]]> - +]]> - -This sample shows how to call RenewConnectionString with required parameters and request content and parse the result. + +This sample shows how to call RenewConnectionString and parse the result. () +{ + ["connectionStringType"] = "Primary", +}); +Response response = client.RenewConnectionString("", "", content); -Response response = client.RenewConnectionString("", "", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call RenewConnectionString with all parameters and request content and parse the result. +() +{ + ["connectionStringType"] = "Primary", +}); +Response response = client.RenewConnectionString("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); Console.WriteLine(result.GetProperty("secondaryDeviceConnectionString").ToString()); -]]> - +]]> - -This sample shows how to call GetSensorsAsync with required parameters and parse the result. + +This sample shows how to call GetSensorsAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSensorsAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("depthInMeters")[0].ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSensorsAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("sensorDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("depthInMeters")[0].ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetSensors with required parameters and parse the result. + +This sample shows how to call GetSensors and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSensors("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("depthInMeters")[0].ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSensors with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("sensorDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("depthInMeters")[0].ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml index 05d6656e96b0..257a633a9860 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/SolutionInference.xml @@ -2,218 +2,218 @@ - -This sample shows how to call CancelAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CancelAsync and parse the result. ", -}; - -Response response = await client.CancelAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", +}); +Response response = await client.CancelAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("").ToString()); ]]> -This sample shows how to call CancelAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CancelAsync with all parameters and request content and parse the result. ", - partnerRequestBody = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CancelAsync("", RequestContent.Create(data)); +}); +Response response = await client.CancelAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("").ToString()); +]]> - -This sample shows how to call Cancel with required parameters and request content, and how to parse the result. + +This sample shows how to call Cancel and parse the result. ", -}; +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -Response response = client.Cancel("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", +}); +Response response = client.Cancel("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("").ToString()); ]]> -This sample shows how to call Cancel with all parameters and request content, and how to parse the result. +This sample shows how to call Cancel with all parameters and request content and parse the result. ", - partnerRequestBody = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.Cancel("", RequestContent.Create(data)); +}); +Response response = client.Cancel("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("").ToString()); +]]> - -This sample shows how to call FetchAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call FetchAsync and parse the result. ", -}; +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -Response response = await client.FetchAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", +}); +Response response = await client.FetchAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("").ToString()); ]]> -This sample shows how to call FetchAsync with all parameters and request content, and how to parse the result. +This sample shows how to call FetchAsync with all parameters and request content and parse the result. ", - partnerRequestBody = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.FetchAsync("", RequestContent.Create(data)); +}); +Response response = await client.FetchAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("").ToString()); +]]> - -This sample shows how to call Fetch with required parameters and request content, and how to parse the result. + +This sample shows how to call Fetch and parse the result. ", -}; +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); -Response response = client.Fetch("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", +}); +Response response = client.Fetch("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("").ToString()); ]]> -This sample shows how to call Fetch with all parameters and request content, and how to parse the result. +This sample shows how to call Fetch with all parameters and request content and parse the result. ", - partnerRequestBody = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.Fetch("", RequestContent.Create(data)); +}); +Response response = client.Fetch("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", -}; - -var operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", +}); +Operation operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("").ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - partnerRequestBody = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", -}; - -var operation = client.CreateOrUpdate(WaitUntil.Completed, "", RequestContent.Create(data)); - +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", +}); +Operation operation = client.CreateOrUpdate(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("").ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - partnerRequestBody = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateOrUpdate(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateOrUpdate(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("").ToString()); +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/TillageData.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/TillageData.xml index 5296ccec4612..a40cd540d2e8 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/TillageData.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/TillageData.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetTillageDataAsync with required parameters and parse the result. + +This sample shows how to call GetTillageDataAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetTillageDataAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTillageDataAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -33,18 +43,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetTillageData with required parameters and parse the result. + +This sample shows how to call GetTillageData and parse the result. ", "", new RequestContext()); +Response response = client.GetTillageData("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTillageData with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -69,56 +88,52 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - value = 123.45d, - }, - tillagePressure = new { - unit = "", - value = 123.45d, - }, - area = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["tillageDepth"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["tillagePressure"] = null +, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -143,56 +158,52 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - value = 123.45d, - }, - tillagePressure = new { - unit = "", - value = 123.45d, - }, - area = new { - unit = "", - value = 123.45d, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["tillageDepth"] = new Dictionary() + { + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, + ["tillagePressure"] = null +, + ["area"] = null +, + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -217,42 +228,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -267,17 +303,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -292,167 +339,291 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetAllTillageDataByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetAllTillageDataByPartyIdAsync and parse the result. ", 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllTillageDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllTillageDataByPartyIdAsync with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllTillageDataByPartyId with required parameters and parse the result. + +This sample shows how to call GetAllTillageDataByPartyId and parse the result. ", 3.14, 3.14, 3.14, 3.14, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllTillageDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllTillageDataByPartyId with all parameters and parse the result. +", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllTillageDataAsync with required parameters and parse the result. + +This sample shows how to call GetAllTillageDataAsync and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetAllTillageDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllTillageDataAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetAllTillageData with required parameters and parse the result. + +This sample shows how to call GetAllTillageData and parse the result. "}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetAllTillageData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetAllTillageData with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -466,19 +637,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -492,8 +675,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Weather.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Weather.xml index b9946c383064..860fca3a1114 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Weather.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Weather.xml @@ -2,13 +2,25 @@ - -This sample shows how to call GetDataDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetDataDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetDataDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("extensionId").ToString()); +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +]]> +This sample shows how to call GetDataDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); @@ -31,18 +43,29 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetDataDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetDataDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetDataDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("extensionId").ToString()); +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +]]> +This sample shows how to call GetDataDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); @@ -65,25 +88,38 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetDataIngestionJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetDataIngestionJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetDataIngestionJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); -Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +]]> +This sample shows how to call GetDataIngestionJobDetailsAsync with all parameters and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("extensionId").ToString()); +Console.WriteLine(result.GetProperty("extensionApiName").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -99,25 +135,38 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetDataIngestionJobDetails with required parameters and parse the result. + +This sample shows how to call GetDataIngestionJobDetails and parse the result. +", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("boundaryId").ToString()); +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("extensionId").ToString()); +Console.WriteLine(result.GetProperty("extensionApiName").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +]]> +This sample shows how to call GetDataIngestionJobDetails with all parameters and parse the result. ", new RequestContext()); +Response response = client.GetDataIngestionJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); -Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -133,172 +182,208 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetWeathersAsync with required parameters and parse the result. + +This sample shows how to call GetWeathersAsync and parse the result. ", "", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetWeathersAsync("", "", "", "", "", null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("extensionId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("dateTime").ToString()); - Console.WriteLine(result.GetProperty("unitSystemCode").ToString()); - Console.WriteLine(result.GetProperty("extensionVersion").ToString()); - Console.WriteLine(result.GetProperty("weatherDataType").ToString()); - Console.WriteLine(result.GetProperty("granularity").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); } ]]> - +This sample shows how to call GetWeathersAsync with all parameters and parse the result. +", "", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("unitSystemCode").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetWeathers with required parameters and parse the result. + +This sample shows how to call GetWeathers and parse the result. ", "", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetWeathers("", "", "", "", "", null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("extensionId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("dateTime").ToString()); - Console.WriteLine(result.GetProperty("unitSystemCode").ToString()); - Console.WriteLine(result.GetProperty("extensionVersion").ToString()); - Console.WriteLine(result.GetProperty("weatherDataType").ToString()); - Console.WriteLine(result.GetProperty("granularity").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); } ]]> - +This sample shows how to call GetWeathers with all parameters and parse the result. +", "", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("unitSystemCode").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateDataDeleteJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateDataDeleteJobAsync and parse the result. ", - partyId = "", - boundaryId = "", -}; - -var operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", +}); +Operation operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); ]]> -This sample shows how to call CreateDataDeleteJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateDataDeleteJobAsync with all parameters and request content and parse the result. ", - partyId = "", - boundaryId = "", - weatherDataType = "", - granularity = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; - -var operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["weatherDataType"] = "", + ["granularity"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Operation operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -320,54 +405,54 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateDataDeleteJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateDataDeleteJob and parse the result. ", - partyId = "", - boundaryId = "", -}; - -var operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", +}); +Operation operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); ]]> -This sample shows how to call CreateDataDeleteJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateDataDeleteJob with all parameters and request content and parse the result. ", - partyId = "", - boundaryId = "", - weatherDataType = "", - granularity = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; - -var operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["weatherDataType"] = "", + ["granularity"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Operation operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -389,68 +474,70 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateDataIngestionJobAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateDataIngestionJobAsync and parse the result. ", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new { - key = new {}, - }, -}; - -var operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Operation operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); -Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); ]]> -This sample shows how to call CreateDataIngestionJobAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateDataIngestionJobAsync with all parameters and request content and parse the result. ", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - extensionDataProviderAppId = "", - extensionDataProviderApiKey = "", - name = "", - description = "", - properties = new { - key = new {}, + ["extensionDataProviderAppId"] = "", + ["extensionDataProviderApiKey"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); -Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -466,68 +553,70 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateDataIngestionJob with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateDataIngestionJob and parse the result. ", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new { - key = new {}, - }, -}; - -var operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Operation operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); -Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); ]]> -This sample shows how to call CreateDataIngestionJob with all parameters and request content, and how to parse the result. +This sample shows how to call CreateDataIngestionJob with all parameters and request content and parse the result. ", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new { - key = new {}, +TokenCredential credential = new DefaultAzureCredential(); +Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - extensionDataProviderAppId = "", - extensionDataProviderApiKey = "", - name = "", - description = "", - properties = new { - key = new {}, + ["extensionDataProviderAppId"] = "", + ["extensionDataProviderApiKey"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; - -var operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); -Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -543,9 +632,8 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/WeatherData.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/WeatherData.xml index 4850b2744ad1..6bb7f849ba48 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/WeatherData.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/WeatherData.xml @@ -2,20 +2,20 @@ - -This sample shows how to call GetWeatherDataAsync with required request content, and how to parse the result. + +This sample shows how to call GetWeatherDataAsync and parse the result. ", - extensionId = "", - extensionApiName = "", - units = "", -}; - -Response response = await client.GetWeatherDataAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["units"] = "", +}); +Response response = await client.GetWeatherDataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -24,34 +24,37 @@ Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionId Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionApiName").ToString()); Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("units").ToString()); ]]> -This sample shows how to call GetWeatherDataAsync with all request content, and how to parse the result. +This sample shows how to call GetWeatherDataAsync with all request content and parse the result. ", - } - }, - providerAppId = "", - providerApiKey = "", - extensionId = "", - extensionApiName = "", - language = "", - startTimeHours = 1234, - endTimeHours = 1234, - duration = 1234, - units = "", - additionalParams = new { - iconResolution = "", - details = true, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["locations"] = new List() +{ +new Dictionary() +{ +["type"] = "LatLong", +["value"] = "", +} +}, + ["providerAppId"] = "", + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["language"] = "", + ["startTimeHours"] = 1234, + ["endTimeHours"] = 1234, + ["duration"] = 1234, + ["units"] = "", + ["additionalParams"] = new Dictionary() + { + ["iconResolution"] = "", + ["details"] = true, }, -}; - -Response response = await client.GetWeatherDataAsync(RequestContent.Create(data)); +}); +Response response = await client.GetWeatherDataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -108,30 +111,29 @@ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProp Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("windSpeed").GetProperty("values")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseLong")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseShort")[0].ToString()); -Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("retryable").ToString()); -]]> - +]]> - -This sample shows how to call GetWeatherData with required request content, and how to parse the result. + +This sample shows how to call GetWeatherData and parse the result. ", - extensionId = "", - extensionApiName = "", - units = "", -}; - -Response response = client.GetWeatherData(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["units"] = "", +}); +Response response = client.GetWeatherData(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -140,34 +142,37 @@ Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionId Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionApiName").ToString()); Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("units").ToString()); ]]> -This sample shows how to call GetWeatherData with all request content, and how to parse the result. +This sample shows how to call GetWeatherData with all request content and parse the result. ", - } - }, - providerAppId = "", - providerApiKey = "", - extensionId = "", - extensionApiName = "", - language = "", - startTimeHours = 1234, - endTimeHours = 1234, - duration = 1234, - units = "", - additionalParams = new { - iconResolution = "", - details = true, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["locations"] = new List() +{ +new Dictionary() +{ +["type"] = "LatLong", +["value"] = "", +} +}, + ["providerAppId"] = "", + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["language"] = "", + ["startTimeHours"] = 1234, + ["endTimeHours"] = 1234, + ["duration"] = 1234, + ["units"] = "", + ["additionalParams"] = new Dictionary() + { + ["iconResolution"] = "", + ["details"] = true, }, -}; - -Response response = client.GetWeatherData(RequestContent.Create(data)); +}); +Response response = client.GetWeatherData(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -224,14 +229,13 @@ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProp Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("windSpeed").GetProperty("values")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseLong")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseShort")[0].ToString()); -Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("retryable").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Zones.xml b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Zones.xml index 14a880b453df..6346b916a26f 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Zones.xml +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/src/Generated/Docs/Zones.xml @@ -2,13 +2,23 @@ - -This sample shows how to call GetZoneAsync with required parameters and parse the result. + +This sample shows how to call GetZoneAsync and parse the result. ", "", new RequestContext()); +Response response = await client.GetZoneAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetZoneAsync with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -24,18 +34,27 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetZone with required parameters and parse the result. + +This sample shows how to call GetZone and parse the result. ", "", new RequestContext()); +Response response = client.GetZone("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetZone with all parameters and parse the result. +", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -51,42 +70,41 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateAsync and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. ", - managementZoneId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["managementZoneId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -102,42 +120,41 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdate with required parameters and parse the result. + +This sample shows how to call CreateOrUpdate and parse the result. ", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. ", - managementZoneId = "", - status = "", - source = "", - name = "", - description = "", - properties = new { - key = new {}, - }, -}; +TokenCredential credential = new DefaultAzureCredential(); +Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); -Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["type"] = "", + ["managementZoneId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() + { + ["key"] = new Dictionary(), + }, +}); +Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -153,42 +170,67 @@ Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. ", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCascadeDeleteJobDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetailsAsync and parse the result. ", new RequestContext()); +Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetailsAsync with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -203,17 +245,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetCascadeDeleteJobDetails with required parameters and parse the result. + +This sample shows how to call GetCascadeDeleteJobDetails and parse the result. ", new RequestContext()); +Response response = client.GetCascadeDeleteJobDetails("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call GetCascadeDeleteJobDetails with all parameters and parse the result. +", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -228,131 +281,267 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call GetZonesByPartyIdAsync with required parameters and parse the result. + +This sample shows how to call GetZonesByPartyIdAsync and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetZonesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetZonesByPartyIdAsync with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetZonesByPartyId with required parameters and parse the result. + +This sample shows how to call GetZonesByPartyId and parse the result. ", new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetZonesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetZonesByPartyId with all parameters and parse the result. +", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetZonesAsync with required parameters and parse the result. + +This sample shows how to call GetZonesAsync and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetZonesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetZonesAsync with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetZones with required parameters and parse the result. + +This sample shows how to call GetZones and parse the result. "}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, new String[]{""}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetZones(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetZones with all parameters and parse the result. +() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); +} +]]> - -This sample shows how to call CreateCascadeDeleteJobAsync with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJobAsync and parse the result. ", "", "", new RequestContext()); +Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJobAsync with all parameters and parse the result. + operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -366,19 +555,31 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> - -This sample shows how to call CreateCascadeDeleteJob with required parameters and parse the result. + +This sample shows how to call CreateCascadeDeleteJob and parse the result. ", "", "", new RequestContext()); +Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("partyId").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("resourceType").ToString()); +]]> +This sample shows how to call CreateCascadeDeleteJob with all parameters and parse the result. + operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -392,8 +593,7 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("endTime").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ApplicationData.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ApplicationData.cs index afcf5684342c..89780b051b85 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ApplicationData.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ApplicationData.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_ApplicationData [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,10 +62,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -101,10 +101,10 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetApplicationData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetApplicationData("", "", new RequestContext()); + Response response = client.GetApplicationData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -114,10 +114,10 @@ public void Example_GetApplicationData() [Ignore("Only validating compilation of examples")] public void Example_GetApplicationData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetApplicationData("", "", new RequestContext()); + Response response = client.GetApplicationData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -148,17 +148,17 @@ public void Example_GetApplicationData_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetApplicationData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetApplicationDataAsync("", "", new RequestContext()); + Response response = await client.GetApplicationDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -168,10 +168,10 @@ public async Task Example_GetApplicationData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetApplicationData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetApplicationDataAsync("", "", new RequestContext()); + Response response = await client.GetApplicationDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -202,19 +202,18 @@ public async Task Example_GetApplicationData_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -224,55 +223,46 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - applicationProductDetails = new[] { - new { - productName = "", - isCarrier = true, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - avgMaterial = new - { - unit = "", - value = 123.45d, - }, - totalMaterial = new - { - unit = "", - value = 123.45d, - }, - area = new - { - unit = "", - value = 123.45d, - }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["applicationProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["isCarrier"] = true, +["avgMaterial"] = new Dictionary() +{ +["unit"] = "", +["value"] = 123.45, +}, +["totalMaterial"] = null +, +} +}, + ["avgMaterial"] = null + , + ["totalMaterial"] = null + , + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -303,19 +293,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -325,55 +314,46 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - applicationProductDetails = new[] { - new { - productName = "", - isCarrier = true, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - avgMaterial = new - { - unit = "", - value = 123.45d, - }, - totalMaterial = new - { - unit = "", - value = 123.45d, - }, - area = new - { - unit = "", - value = 123.45d, - }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["applicationProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["isCarrier"] = true, +["avgMaterial"] = new Dictionary() +{ +["unit"] = "", +["value"] = 123.45, +}, +["totalMaterial"] = null +, +} +}, + ["avgMaterial"] = null + , + ["totalMaterial"] = null + , + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); @@ -404,15 +384,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -422,8 +402,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -433,8 +413,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -444,8 +424,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -455,13 +435,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllApplicationData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllApplicationData(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllApplicationData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -469,41 +449,59 @@ public void Example_GetAllApplicationData() [Ignore("Only validating compilation of examples")] public void Example_GetAllApplicationData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllApplicationData(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllApplicationData(123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -511,13 +509,13 @@ public void Example_GetAllApplicationData_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllApplicationData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllApplicationDataAsync(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllApplicationDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -525,41 +523,59 @@ public async Task Example_GetAllApplicationData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllApplicationData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllApplicationDataAsync(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllApplicationDataAsync(123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -567,13 +583,13 @@ public async Task Example_GetAllApplicationData_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllApplicationDataByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllApplicationDataByPartyId("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllApplicationDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -581,41 +597,59 @@ public void Example_GetAllApplicationDataByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetAllApplicationDataByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllApplicationDataByPartyId("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllApplicationDataByPartyId("", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -623,13 +657,13 @@ public void Example_GetAllApplicationDataByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllApplicationDataByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllApplicationDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllApplicationDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -637,41 +671,59 @@ public async Task Example_GetAllApplicationDataByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllApplicationDataByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllApplicationDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllApplicationDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("isCarrier").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("applicationProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -679,12 +731,12 @@ public async Task Example_GetAllApplicationDataByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -695,12 +747,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -720,12 +772,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -736,12 +788,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetApplicationDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Attachments.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Attachments.cs index 1c7cd08baa11..258bb901e0cf 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Attachments.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Attachments.cs @@ -13,6 +13,7 @@ using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +24,10 @@ internal class Samples_Attachments [Ignore("Only validating compilation of examples")] public void Example_GetAttachment() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetAttachment("", "", new RequestContext()); + Response response = client.GetAttachment("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +37,10 @@ public void Example_GetAttachment() [Ignore("Only validating compilation of examples")] public void Example_GetAttachment_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetAttachment("", "", new RequestContext()); + Response response = client.GetAttachment("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -62,10 +63,10 @@ public void Example_GetAttachment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAttachment_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetAttachmentAsync("", "", new RequestContext()); + Response response = await client.GetAttachmentAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -75,10 +76,10 @@ public async Task Example_GetAttachment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAttachment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetAttachmentAsync("", "", new RequestContext()); + Response response = await client.GetAttachmentAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -101,12 +102,11 @@ public async Task Example_GetAttachment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - var data = File.OpenRead(""); - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -116,12 +116,11 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); - - var data = File.OpenRead(""); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -144,12 +143,11 @@ public void Example_CreateOrUpdate_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - var data = File.OpenRead(""); - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -159,12 +157,11 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); - - var data = File.OpenRead(""); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -187,8 +184,8 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -198,8 +195,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -209,8 +206,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -220,8 +217,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -231,13 +228,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Download() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.Download("", "", new RequestContext()); + Response response = client.Download("", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -248,13 +245,13 @@ public void Example_Download() [Ignore("Only validating compilation of examples")] public void Example_Download_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.Download("", "", new RequestContext()); + Response response = client.Download("", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -265,13 +262,13 @@ public void Example_Download_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Download_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.DownloadAsync("", "", new RequestContext()); + Response response = await client.DownloadAsync("", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -282,13 +279,13 @@ public async Task Example_Download_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Download_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.DownloadAsync("", "", new RequestContext()); + Response response = await client.DownloadAsync("", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -299,13 +296,13 @@ public async Task Example_Download_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAttachmentsByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAttachmentsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAttachmentsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -313,26 +310,44 @@ public void Example_GetAttachmentsByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetAttachmentsByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAttachmentsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAttachmentsByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); } } @@ -340,13 +355,13 @@ public void Example_GetAttachmentsByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAttachmentsByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAttachmentsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -354,26 +369,44 @@ public async Task Example_GetAttachmentsByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAttachmentsByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAttachmentsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Boundaries.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Boundaries.cs index 5f5e80e90866..4572f862eb2f 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Boundaries.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Boundaries.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Boundaries [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,10 +62,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -101,12 +101,11 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -116,69 +115,50 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - geometry = new - { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", - }, - type = "", - centroid = new + ["geometry"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", - }, - bbox = new - { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - parentId = "", - area = new + ["type"] = "", + ["centroid"] = null + , + ["bbox"] = null + , + ["parentId"] = "", + ["area"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - parentType = "Field", - status = "", - source = "", - name = "", - description = "", - properties = new + ["parentType"] = "Field", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -201,19 +181,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -223,69 +202,50 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - geometry = new - { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", - }, - type = "", - centroid = new - { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", - }, - bbox = new + ["geometry"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - parentId = "", - area = new + ["type"] = "", + ["centroid"] = null + , + ["bbox"] = null + , + ["parentId"] = "", + ["area"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - parentType = "Field", - status = "", - source = "", - name = "", - description = "", - properties = new + ["parentType"] = "Field", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -308,17 +268,17 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetBoundary() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetBoundary("", "", new RequestContext()); + Response response = client.GetBoundary("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -328,10 +288,10 @@ public void Example_GetBoundary() [Ignore("Only validating compilation of examples")] public void Example_GetBoundary_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetBoundary("", "", new RequestContext()); + Response response = client.GetBoundary("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -354,17 +314,17 @@ public void Example_GetBoundary_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetBoundary_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetBoundaryAsync("", "", new RequestContext()); + Response response = await client.GetBoundaryAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -374,10 +334,10 @@ public async Task Example_GetBoundary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetBoundary_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetBoundaryAsync("", "", new RequestContext()); + Response response = await client.GetBoundaryAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("geometry").GetProperty("type").ToString()); @@ -400,15 +360,15 @@ public async Task Example_GetBoundary_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -418,8 +378,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -429,8 +389,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -440,8 +400,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -451,10 +411,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetOverlap() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetOverlap("", "", "", "", new RequestContext()); + Response response = client.GetOverlap("", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -464,10 +424,10 @@ public void Example_GetOverlap() [Ignore("Only validating compilation of examples")] public void Example_GetOverlap_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetOverlap("", "", "", "", new RequestContext()); + Response response = client.GetOverlap("", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryArea").ToString()); @@ -479,10 +439,10 @@ public void Example_GetOverlap_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetOverlap_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetOverlapAsync("", "", "", "", new RequestContext()); + Response response = await client.GetOverlapAsync("", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -492,10 +452,10 @@ public async Task Example_GetOverlap_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOverlap_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetOverlapAsync("", "", "", "", new RequestContext()); + Response response = await client.GetOverlapAsync("", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryArea").ToString()); @@ -507,13 +467,13 @@ public async Task Example_GetOverlap_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetBoundaries() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetBoundaries("", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetBoundaries(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -521,29 +481,44 @@ public void Example_GetBoundaries() [Ignore("Only validating compilation of examples")] public void Example_GetBoundaries_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetBoundaries("", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetBoundaries("", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -551,13 +526,13 @@ public void Example_GetBoundaries_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetBoundaries_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetBoundariesAsync("", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetBoundariesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -565,29 +540,44 @@ public async Task Example_GetBoundaries_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetBoundaries_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetBoundariesAsync("", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetBoundariesAsync("", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -595,15 +585,14 @@ public async Task Example_GetBoundaries_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Search() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - foreach (var item in client.Search(RequestContent.Create(data))) + RequestContent content = RequestContent.Create(new Dictionary()); + foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -611,71 +600,79 @@ public void Example_Search() [Ignore("Only validating compilation of examples")] public void Example_Search_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - ids = new[] { - "" - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - }; - - foreach (var item in client.Search(RequestContent.Create(data))) + }); + foreach (BinaryData item in client.Search(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -683,15 +680,14 @@ public void Example_Search_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Search_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - await foreach (var item in client.SearchAsync(RequestContent.Create(data))) + RequestContent content = RequestContent.Create(new Dictionary()); + await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -699,71 +695,79 @@ public async Task Example_Search_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Search_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - ids = new[] { - "" - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - }; - - await foreach (var item in client.SearchAsync(RequestContent.Create(data))) + }); + await foreach (BinaryData item in client.SearchAsync(content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -771,13 +775,13 @@ public async Task Example_Search_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetBoundariesByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetBoundariesByPartyId("", "", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetBoundariesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -785,29 +789,44 @@ public void Example_GetBoundariesByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetBoundariesByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetBoundariesByPartyId("", "", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetBoundariesByPartyId("", "", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -815,13 +834,13 @@ public void Example_GetBoundariesByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetBoundariesByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetBoundariesByPartyIdAsync("", "", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetBoundariesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -829,29 +848,44 @@ public async Task Example_GetBoundariesByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetBoundariesByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetBoundariesByPartyIdAsync("", "", "", new string[] { "" }, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetBoundariesByPartyIdAsync("", "", "", new List() +{ +"" +}, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -859,15 +893,14 @@ public async Task Example_GetBoundariesByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_SearchByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.SearchByPartyId("", RequestContent.Create(data))) + RequestContent content = RequestContent.Create(new Dictionary()); + foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -875,71 +908,79 @@ public void Example_SearchByPartyId() [Ignore("Only validating compilation of examples")] public void Example_SearchByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - ids = new[] { - "" - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - }; - - foreach (var item in client.SearchByPartyId("", RequestContent.Create(data))) + }); + foreach (BinaryData item in client.SearchByPartyId("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -947,15 +988,14 @@ public void Example_SearchByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_SearchByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.SearchByPartyIdAsync("", RequestContent.Create(data))) + RequestContent content = RequestContent.Create(new Dictionary()); + await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -963,71 +1003,79 @@ public async Task Example_SearchByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_SearchByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - ids = new[] { - "" - }, - names = new[] { - "" - }, - propertyFilters = new[] { - "" - }, - statuses = new[] { - "" - }, - minCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - maxCreatedDateTime = "2022-05-10T18:57:31.2311892Z", - minLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxLastModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - maxPageSize = 1234, - skipToken = "", - parentType = "Field", - type = "", - parentIds = new[] { - "" - }, - minArea = 123.45d, - maxArea = 123.45d, - intersectsWithGeometry = new + ["ids"] = new List() +{ +"" +}, + ["names"] = new List() +{ +"" +}, + ["propertyFilters"] = new List() +{ +"" +}, + ["statuses"] = new List() +{ +"" +}, + ["minCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxCreatedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["minLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxLastModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["maxPageSize"] = 1234, + ["skipToken"] = "", + ["parentType"] = "Field", + ["type"] = "", + ["parentIds"] = new List() +{ +"" +}, + ["minArea"] = 123.45, + ["maxArea"] = 123.45, + ["intersectsWithGeometry"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - }; - - await foreach (var item in client.SearchByPartyIdAsync("", RequestContent.Create(data))) + }); + await foreach (BinaryData item in client.SearchByPartyIdAsync("", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -1035,12 +1083,12 @@ public async Task Example_SearchByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -1051,12 +1099,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -1076,12 +1124,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -1092,12 +1140,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetBoundariesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_CropProducts.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_CropProducts.cs index acef7352a520..c1f9fe5d23eb 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_CropProducts.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_CropProducts.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_CropProducts [Ignore("Only validating compilation of examples")] public void Example_GetCropProduct() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCropProduct("", new RequestContext()); + Response response = client.GetCropProduct("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetCropProduct() [Ignore("Only validating compilation of examples")] public void Example_GetCropProduct_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCropProduct("", new RequestContext()); + Response response = client.GetCropProduct("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -59,17 +59,17 @@ public void Example_GetCropProduct_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetCropProduct_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCropProductAsync("", new RequestContext()); + Response response = await client.GetCropProductAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -79,10 +79,10 @@ public async Task Example_GetCropProduct_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCropProduct_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCropProductAsync("", new RequestContext()); + Response response = await client.GetCropProductAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -102,19 +102,18 @@ public async Task Example_GetCropProduct_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -124,36 +123,37 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - cropIds = new[] { - "" - }, - brand = "", - product = "", - trait = "", - relativeMaturity = new + ["cropIds"] = new List() +{ +"" +}, + ["brand"] = "", + ["product"] = "", + ["trait"] = "", + ["relativeMaturity"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - treatments = new[] { - "" - }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["treatments"] = new List() +{ +"" +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -173,19 +173,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -195,36 +194,37 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - cropIds = new[] { - "" - }, - brand = "", - product = "", - trait = "", - relativeMaturity = new + ["cropIds"] = new List() +{ +"" +}, + ["brand"] = "", + ["product"] = "", + ["trait"] = "", + ["relativeMaturity"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - treatments = new[] { - "" - }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["treatments"] = new List() +{ +"" +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); @@ -244,15 +244,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -262,8 +262,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -273,8 +273,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -284,8 +284,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -295,13 +295,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCropProducts() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetCropProducts(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetCropProducts(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -309,30 +309,54 @@ public void Example_GetCropProducts() [Ignore("Only validating compilation of examples")] public void Example_GetCropProducts_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetCropProducts(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetCropProducts(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); - Console.WriteLine(result.GetProperty("brand").ToString()); - Console.WriteLine(result.GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("trait").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("treatments")[0].ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("cropIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("brand").ToString()); + Console.WriteLine(result[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("trait").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("treatments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -340,13 +364,13 @@ public void Example_GetCropProducts_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCropProducts_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetCropProductsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetCropProductsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -354,30 +378,54 @@ public async Task Example_GetCropProducts_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCropProducts_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropProductsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetCropProductsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetCropProductsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("cropIds")[0].ToString()); - Console.WriteLine(result.GetProperty("brand").ToString()); - Console.WriteLine(result.GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("trait").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeMaturity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("treatments")[0].ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("cropIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("brand").ToString()); + Console.WriteLine(result[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("trait").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeMaturity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("treatments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Crops.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Crops.cs index bb3ecd379b4c..102316d44742 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Crops.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Crops.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Crops [Ignore("Only validating compilation of examples")] public void Example_GetCrop() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCrop("", new RequestContext()); + Response response = client.GetCrop("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,16 +36,16 @@ public void Example_GetCrop() [Ignore("Only validating compilation of examples")] public void Example_GetCrop_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCrop("", new RequestContext()); + Response response = client.GetCrop("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -56,17 +56,17 @@ public void Example_GetCrop_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetCrop_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCropAsync("", new RequestContext()); + Response response = await client.GetCropAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -76,16 +76,16 @@ public async Task Example_GetCrop_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCrop_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCropAsync("", new RequestContext()); + Response response = await client.GetCropAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -96,19 +96,18 @@ public async Task Example_GetCrop_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -118,38 +117,37 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - phenotype = "", - breedingMethod = "VARIETY", - measurements = new + ["phenotype"] = "", + ["breedingMethod"] = "VARIETY", + ["measurements"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -160,19 +158,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -182,38 +179,37 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - phenotype = "", - breedingMethod = "VARIETY", - measurements = new + ["phenotype"] = "", + ["breedingMethod"] = "VARIETY", + ["measurements"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("phenotype").ToString()); Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -224,15 +220,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -242,8 +238,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -253,8 +249,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -264,8 +260,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -275,13 +271,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCrops() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetCrops(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetCrops(null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -289,27 +285,45 @@ public void Example_GetCrops() [Ignore("Only validating compilation of examples")] public void Example_GetCrops_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetCrops(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetCrops(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("phenotype").ToString()); - Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("phenotype").ToString()); + Console.WriteLine(result[0].GetProperty("breedingMethod").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -317,13 +331,13 @@ public void Example_GetCrops_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCrops_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetCropsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetCropsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -331,27 +345,45 @@ public async Task Example_GetCrops_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCrops_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetCropsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetCropsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetCropsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("phenotype").ToString()); - Console.WriteLine(result.GetProperty("breedingMethod").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("phenotype").ToString()); + Console.WriteLine(result[0].GetProperty("breedingMethod").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_DeviceDataModels.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_DeviceDataModels.cs index 8722cbf412fc..81b2927f32e6 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_DeviceDataModels.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_DeviceDataModels.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,12 +23,11 @@ internal class Samples_DeviceDataModels [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -38,30 +37,31 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - manufacturer = "", - productCode = "", - ports = new[] { - new { - name = "", - type = "", - } - }, - status = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["ports"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["type"] = "", +} +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -79,19 +79,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -101,30 +100,31 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - manufacturer = "", - productCode = "", - ports = new[] { - new { - name = "", - type = "", - } - }, - status = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["ports"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["type"] = "", +} +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -142,17 +142,17 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetDeviceDataModel() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDeviceDataModel("", "", new RequestContext()); + Response response = client.GetDeviceDataModel("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -162,10 +162,10 @@ public void Example_GetDeviceDataModel() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceDataModel_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDeviceDataModel("", "", new RequestContext()); + Response response = client.GetDeviceDataModel("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -183,17 +183,17 @@ public void Example_GetDeviceDataModel_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceDataModel_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDeviceDataModelAsync("", "", new RequestContext()); + Response response = await client.GetDeviceDataModelAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -203,10 +203,10 @@ public async Task Example_GetDeviceDataModel_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceDataModel_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDeviceDataModelAsync("", "", new RequestContext()); + Response response = await client.GetDeviceDataModelAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); @@ -224,15 +224,15 @@ public async Task Example_GetDeviceDataModel_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -242,8 +242,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -253,8 +253,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -264,8 +264,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -275,13 +275,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceDataModels() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetDeviceDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetDeviceDataModels("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -289,28 +289,40 @@ public void Example_GetDeviceDataModels() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceDataModels_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetDeviceDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetDeviceDataModels("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -318,13 +330,13 @@ public void Example_GetDeviceDataModels_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceDataModels_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetDeviceDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetDeviceDataModelsAsync("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -332,28 +344,40 @@ public async Task Example_GetDeviceDataModels_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceDataModels_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDeviceDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetDeviceDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetDeviceDataModelsAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("ports")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("ports")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Devices.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Devices.cs index c9724b983aeb..c32e5fc30b5d 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Devices.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Devices.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,12 +23,11 @@ internal class Samples_Devices [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -38,32 +37,31 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deviceDataModelId = "", - integrationId = "", - type = "", - hardwareId = "", - reportingIntervalInSeconds = 1234, - parentDeviceId = "", - location = new + ["deviceDataModelId"] = "", + ["integrationId"] = "", + ["type"] = "", + ["hardwareId"] = "", + ["reportingIntervalInSeconds"] = 1234, + ["parentDeviceId"] = "", + ["location"] = new Dictionary() { - latitude = 123.45d, - longitude = 123.45d, + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - status = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -84,19 +82,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -106,32 +103,31 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deviceDataModelId = "", - integrationId = "", - type = "", - hardwareId = "", - reportingIntervalInSeconds = 1234, - parentDeviceId = "", - location = new + ["deviceDataModelId"] = "", + ["integrationId"] = "", + ["type"] = "", + ["hardwareId"] = "", + ["reportingIntervalInSeconds"] = 1234, + ["parentDeviceId"] = "", + ["location"] = new Dictionary() { - latitude = 123.45d, - longitude = 123.45d, + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - status = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -152,17 +148,17 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetDevice() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDevice("", "", new RequestContext()); + Response response = client.GetDevice("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -172,10 +168,10 @@ public void Example_GetDevice() [Ignore("Only validating compilation of examples")] public void Example_GetDevice_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDevice("", "", new RequestContext()); + Response response = client.GetDevice("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -196,17 +192,17 @@ public void Example_GetDevice_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetDevice_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDeviceAsync("", "", new RequestContext()); + Response response = await client.GetDeviceAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -216,10 +212,10 @@ public async Task Example_GetDevice_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevice_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDeviceAsync("", "", new RequestContext()); + Response response = await client.GetDeviceAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); @@ -240,15 +236,15 @@ public async Task Example_GetDevice_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -258,8 +254,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -269,8 +265,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -280,8 +276,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -291,13 +287,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDevices() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetDevices("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetDevices("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -305,31 +301,49 @@ public void Example_GetDevices() [Ignore("Only validating compilation of examples")] public void Example_GetDevices_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetDevices("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetDevices("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("reportingIntervalInSeconds").ToString()); - Console.WriteLine(result.GetProperty("parentDeviceId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("deviceDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("reportingIntervalInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("parentDeviceId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -337,13 +351,13 @@ public void Example_GetDevices_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevices_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetDevicesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetDevicesAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -351,31 +365,49 @@ public async Task Example_GetDevices_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevices_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetDevicesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetDevicesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetDevicesAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("reportingIntervalInSeconds").ToString()); - Console.WriteLine(result.GetProperty("parentDeviceId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("deviceDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("reportingIntervalInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("parentDeviceId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmBeatsClient.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmBeatsClient.cs index 1ea53d911556..b13b5a40b2ff 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmBeatsClient.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmBeatsClient.cs @@ -5,12 +5,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using Azure; -using Azure.Core; using Azure.Identity; namespace Azure.Verticals.AgriFood.Farming.Samples diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmOperationsDataIngestion.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmOperationsDataIngestion.cs index aaee80cf8bc2..a12d0b75fc2f 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmOperationsDataIngestion.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmOperationsDataIngestion.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_FarmOperationsDataIngestion [Ignore("Only validating compilation of examples")] public void Example_GetJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetJobDetails("", new RequestContext()); + Response response = client.GetJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetJobDetails("", new RequestContext()); + Response response = client.GetJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,17 +62,17 @@ public void Example_GetJobDetails_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetJobDetailsAsync("", new RequestContext()); + Response response = await client.GetJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -84,10 +84,10 @@ public async Task Example_GetJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetJobDetailsAsync("", new RequestContext()); + Response response = await client.GetJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -108,26 +108,25 @@ public async Task Example_GetJobDetails_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - authProviderId = "", - startYear = 1234, - }; - - var operation = client.CreateJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["authProviderId"] = "", + ["startYear"] = 1234, + }); + Operation operation = client.CreateJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); @@ -138,29 +137,29 @@ public void Example_CreateJob() [Ignore("Only validating compilation of examples")] public void Example_CreateJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - authProviderId = "", - operations = new[] { - "" - }, - startYear = 1234, - isIncremental = true, - name = "", - description = "", - properties = new + ["partyId"] = "", + ["authProviderId"] = "", + ["operations"] = new List() +{ +"" +}, + ["startYear"] = 1234, + ["isIncremental"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); @@ -180,26 +179,25 @@ public void Example_CreateJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - authProviderId = "", - startYear = 1234, - }; - - var operation = await client.CreateJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["authProviderId"] = "", + ["startYear"] = 1234, + }); + Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); @@ -210,29 +208,29 @@ public async Task Example_CreateJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmOperationsDataIngestion client = new FarmBeatsClient(credential).GetFarmOperationsDataIngestionClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - authProviderId = "", - operations = new[] { - "" - }, - startYear = 1234, - isIncremental = true, - name = "", - description = "", - properties = new + ["partyId"] = "", + ["authProviderId"] = "", + ["operations"] = new List() +{ +"" +}, + ["startYear"] = 1234, + ["isIncremental"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("authProviderId").ToString()); @@ -252,7 +250,7 @@ public async Task Example_CreateJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmerOAuthTokens.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmerOAuthTokens.cs index 72169e7aed75..891803b76d2a 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmerOAuthTokens.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_FarmerOAuthTokens.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,17 +23,16 @@ internal class Samples_FarmerOAuthTokens [Ignore("Only validating compilation of examples")] public void Example_GetOAuthConnectionLink() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - oAuthProviderId = "", - userRedirectLink = "", - }; - - Response response = client.GetOAuthConnectionLink(RequestContent.Create(data)); + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", + }); + Response response = client.GetOAuthConnectionLink(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -43,18 +42,17 @@ public void Example_GetOAuthConnectionLink() [Ignore("Only validating compilation of examples")] public void Example_GetOAuthConnectionLink_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - oAuthProviderId = "", - userRedirectLink = "", - userRedirectState = "", - }; - - Response response = client.GetOAuthConnectionLink(RequestContent.Create(data)); + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", + ["userRedirectState"] = "", + }); + Response response = client.GetOAuthConnectionLink(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -64,17 +62,16 @@ public void Example_GetOAuthConnectionLink_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetOAuthConnectionLink_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - oAuthProviderId = "", - userRedirectLink = "", - }; - - Response response = await client.GetOAuthConnectionLinkAsync(RequestContent.Create(data)); + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", + }); + Response response = await client.GetOAuthConnectionLinkAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -84,18 +81,17 @@ public async Task Example_GetOAuthConnectionLink_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOAuthConnectionLink_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - oAuthProviderId = "", - userRedirectLink = "", - userRedirectState = "", - }; - - Response response = await client.GetOAuthConnectionLinkAsync(RequestContent.Create(data)); + ["partyId"] = "", + ["oAuthProviderId"] = "", + ["userRedirectLink"] = "", + ["userRedirectState"] = "", + }); + Response response = await client.GetOAuthConnectionLinkAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -105,10 +101,10 @@ public async Task Example_GetOAuthConnectionLink_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -120,10 +116,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -144,10 +140,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -159,10 +155,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -183,14 +179,14 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAuthenticatedFarmersDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAuthenticatedFarmersDetails(new string[] { "" }, new string[] { "" }, true, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAuthenticatedFarmersDetails(null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("authProviderId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); } } @@ -198,18 +194,24 @@ public void Example_GetAuthenticatedFarmersDetails() [Ignore("Only validating compilation of examples")] public void Example_GetAuthenticatedFarmersDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAuthenticatedFarmersDetails(new string[] { "" }, new string[] { "" }, true, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAuthenticatedFarmersDetails(new List() +{ +"" +}, new List() +{ +"" +}, true, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("authProviderId").ToString()); - Console.WriteLine(result.GetProperty("isValid").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result[0].GetProperty("isValid").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); } } @@ -217,14 +219,14 @@ public void Example_GetAuthenticatedFarmersDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAuthenticatedFarmersDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAuthenticatedFarmersDetailsAsync(new string[] { "" }, new string[] { "" }, true, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAuthenticatedFarmersDetailsAsync(null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("authProviderId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); } } @@ -232,18 +234,24 @@ public async Task Example_GetAuthenticatedFarmersDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAuthenticatedFarmersDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAuthenticatedFarmersDetailsAsync(new string[] { "" }, new string[] { "" }, true, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAuthenticatedFarmersDetailsAsync(new List() +{ +"" +}, new List() +{ +"" +}, true, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("authProviderId").ToString()); - Console.WriteLine(result.GetProperty("isValid").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("authProviderId").ToString()); + Console.WriteLine(result[0].GetProperty("isValid").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); } } @@ -251,12 +259,12 @@ public async Task Example_GetAuthenticatedFarmersDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -267,12 +275,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -292,12 +300,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -308,12 +316,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + FarmerOAuthTokens client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Farms.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Farms.cs index 8635de79fda2..0595a3b45620 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Farms.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Farms.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Farms [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,10 +62,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -101,10 +101,10 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetFarm() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetFarm("", "", new RequestContext()); + Response response = client.GetFarm("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -114,10 +114,10 @@ public void Example_GetFarm() [Ignore("Only validating compilation of examples")] public void Example_GetFarm_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetFarm("", "", new RequestContext()); + Response response = client.GetFarm("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -131,17 +131,17 @@ public void Example_GetFarm_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetFarm_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetFarmAsync("", "", new RequestContext()); + Response response = await client.GetFarmAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -151,10 +151,10 @@ public async Task Example_GetFarm_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetFarm_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetFarmAsync("", "", new RequestContext()); + Response response = await client.GetFarmAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -168,19 +168,18 @@ public async Task Example_GetFarm_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -190,22 +189,21 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -219,19 +217,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -241,22 +238,21 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -270,15 +266,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -288,8 +284,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -299,8 +295,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -310,8 +306,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -321,13 +317,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetFarms() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFarms(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFarms(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -335,24 +331,36 @@ public void Example_GetFarms() [Ignore("Only validating compilation of examples")] public void Example_GetFarms_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFarms(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFarms(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -360,13 +368,13 @@ public void Example_GetFarms_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetFarms_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFarmsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFarmsAsync(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -374,24 +382,36 @@ public async Task Example_GetFarms_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetFarms_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFarmsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFarmsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -399,13 +419,13 @@ public async Task Example_GetFarms_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetFarmsByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFarmsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFarmsByPartyId("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -413,24 +433,36 @@ public void Example_GetFarmsByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetFarmsByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFarmsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFarmsByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -438,13 +470,13 @@ public void Example_GetFarmsByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetFarmsByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFarmsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFarmsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -452,24 +484,36 @@ public async Task Example_GetFarmsByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetFarmsByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFarmsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFarmsByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -477,12 +521,12 @@ public async Task Example_GetFarmsByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -493,12 +537,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -518,12 +562,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -534,12 +578,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFarmsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Farms client = new FarmBeatsClient(credential).GetFarmsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Fields.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Fields.cs index 6e22fc44f38b..5f618e2f4a4a 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Fields.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Fields.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Fields [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,10 +62,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -101,10 +101,10 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetField() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetField("", "", new RequestContext()); + Response response = client.GetField("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -114,10 +114,10 @@ public void Example_GetField() [Ignore("Only validating compilation of examples")] public void Example_GetField_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetField("", "", new RequestContext()); + Response response = client.GetField("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -132,17 +132,17 @@ public void Example_GetField_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetField_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetFieldAsync("", "", new RequestContext()); + Response response = await client.GetFieldAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -152,10 +152,10 @@ public async Task Example_GetField_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetField_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetFieldAsync("", "", new RequestContext()); + Response response = await client.GetFieldAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -170,19 +170,18 @@ public async Task Example_GetField_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -192,23 +191,22 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - farmId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["farmId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -223,19 +221,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -245,23 +242,22 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - farmId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["farmId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("farmId").ToString()); @@ -276,15 +272,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -294,8 +290,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -305,8 +301,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -316,8 +312,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -327,13 +323,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetFields() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFields(null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -341,25 +337,40 @@ public void Example_GetFields() [Ignore("Only validating compilation of examples")] public void Example_GetFields_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFields(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -367,13 +378,13 @@ public void Example_GetFields_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetFields_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFieldsAsync(null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -381,25 +392,40 @@ public async Task Example_GetFields_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetFields_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFieldsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -407,13 +433,13 @@ public async Task Example_GetFields_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetFieldsByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFieldsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -421,25 +447,40 @@ public void Example_GetFieldsByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetFieldsByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetFieldsByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -447,13 +488,13 @@ public void Example_GetFieldsByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetFieldsByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFieldsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -461,25 +502,40 @@ public async Task Example_GetFieldsByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetFieldsByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetFieldsByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -487,12 +543,12 @@ public async Task Example_GetFieldsByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -503,12 +559,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -528,12 +584,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -544,12 +600,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetFieldsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Fields client = new FarmBeatsClient(credential).GetFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_HarvestData.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_HarvestData.cs index 998f00531567..8f1a4769f565 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_HarvestData.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_HarvestData.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_HarvestData [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,10 +62,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -101,10 +101,10 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetHarvestData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetHarvestData("", "", new RequestContext()); + Response response = client.GetHarvestData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -114,10 +114,10 @@ public void Example_GetHarvestData() [Ignore("Only validating compilation of examples")] public void Example_GetHarvestData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetHarvestData("", "", new RequestContext()); + Response response = client.GetHarvestData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -163,17 +163,17 @@ public void Example_GetHarvestData_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetHarvestData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetHarvestDataAsync("", "", new RequestContext()); + Response response = await client.GetHarvestDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -183,10 +183,10 @@ public async Task Example_GetHarvestData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetHarvestData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetHarvestDataAsync("", "", new RequestContext()); + Response response = await client.GetHarvestDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -232,19 +232,18 @@ public async Task Example_GetHarvestData_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -254,90 +253,61 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - totalYield = new - { - unit = "", - value = 123.45d, - }, - avgYield = new - { - unit = "", - value = 123.45d, - }, - totalWetMass = new - { - unit = "", - value = 123.45d, - }, - avgWetMass = new - { - unit = "", - value = 123.45d, - }, - avgMoisture = new + ["totalYield"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - avgSpeed = new - { - unit = "", - value = 123.45d, - }, - harvestProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalYield = new { - unit = "", - value = 123.45d, - }, - avgYield = new { - unit = "", - value = 123.45d, - }, - avgMoisture = new { - unit = "", - value = 123.45d, - }, - totalWetMass = new { - unit = "", - value = 123.45d, - }, - avgWetMass = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new - { - unit = "", - value = 123.45d, - }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["avgYield"] = null + , + ["totalWetMass"] = null + , + ["avgWetMass"] = null + , + ["avgMoisture"] = null + , + ["avgSpeed"] = null + , + ["harvestProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalYield"] = null +, +["avgYield"] = null +, +["avgMoisture"] = null +, +["totalWetMass"] = null +, +["avgWetMass"] = null +, +} +}, + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -383,19 +353,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -405,90 +374,61 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - totalYield = new + ["totalYield"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - avgYield = new - { - unit = "", - value = 123.45d, - }, - totalWetMass = new - { - unit = "", - value = 123.45d, - }, - avgWetMass = new - { - unit = "", - value = 123.45d, - }, - avgMoisture = new - { - unit = "", - value = 123.45d, - }, - avgSpeed = new - { - unit = "", - value = 123.45d, - }, - harvestProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalYield = new { - unit = "", - value = 123.45d, - }, - avgYield = new { - unit = "", - value = 123.45d, - }, - avgMoisture = new { - unit = "", - value = 123.45d, - }, - totalWetMass = new { - unit = "", - value = 123.45d, - }, - avgWetMass = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new - { - unit = "", - value = 123.45d, - }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["avgYield"] = null + , + ["totalWetMass"] = null + , + ["avgWetMass"] = null + , + ["avgMoisture"] = null + , + ["avgSpeed"] = null + , + ["harvestProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalYield"] = null +, +["avgYield"] = null +, +["avgMoisture"] = null +, +["totalWetMass"] = null +, +["avgWetMass"] = null +, +} +}, + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); @@ -534,15 +474,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -552,8 +492,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -563,8 +503,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -574,8 +514,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -585,13 +525,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllHarvestData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllHarvestData(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllHarvestData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -599,56 +539,74 @@ public void Example_GetAllHarvestData() [Ignore("Only validating compilation of examples")] public void Example_GetAllHarvestData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllHarvestData(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllHarvestData(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -656,13 +614,13 @@ public void Example_GetAllHarvestData_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllHarvestData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllHarvestDataAsync(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllHarvestDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -670,56 +628,74 @@ public async Task Example_GetAllHarvestData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllHarvestData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllHarvestDataAsync(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllHarvestDataAsync(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -727,13 +703,13 @@ public async Task Example_GetAllHarvestData_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllHarvestDataByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllHarvestDataByPartyId("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllHarvestDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -741,56 +717,74 @@ public void Example_GetAllHarvestDataByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetAllHarvestDataByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllHarvestDataByPartyId("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllHarvestDataByPartyId("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -798,13 +792,13 @@ public void Example_GetAllHarvestDataByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllHarvestDataByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllHarvestDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllHarvestDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -812,56 +806,74 @@ public async Task Example_GetAllHarvestDataByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllHarvestDataByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllHarvestDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllHarvestDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgYield").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("totalWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("harvestProductDetails")[0].GetProperty("avgWetMass").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -869,12 +881,12 @@ public async Task Example_GetAllHarvestDataByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -885,12 +897,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -910,12 +922,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -926,12 +938,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetHarvestDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + HarvestData client = new FarmBeatsClient(credential).GetHarvestDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ImageProcessing.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ImageProcessing.cs index 55e37da6d64e..ef1d079caa16 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ImageProcessing.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ImageProcessing.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_ImageProcessing [Ignore("Only validating compilation of examples")] public void Example_GetRasterizeJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetRasterizeJob("", new RequestContext()); + Response response = client.GetRasterizeJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetRasterizeJob() [Ignore("Only validating compilation of examples")] public void Example_GetRasterizeJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetRasterizeJob("", new RequestContext()); + Response response = client.GetRasterizeJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -60,17 +60,17 @@ public void Example_GetRasterizeJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetRasterizeJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetRasterizeJobAsync("", new RequestContext()); + Response response = await client.GetRasterizeJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -82,10 +82,10 @@ public async Task Example_GetRasterizeJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetRasterizeJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetRasterizeJobAsync("", new RequestContext()); + Response response = await client.GetRasterizeJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -104,28 +104,28 @@ public async Task Example_GetRasterizeJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateRasterizeJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, - }; - - var operation = client.CreateRasterizeJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, + }); + Operation operation = client.CreateRasterizeJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); @@ -136,27 +136,27 @@ public void Example_CreateRasterizeJob() [Ignore("Only validating compilation of examples")] public void Example_CreateRasterizeJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, - name = "", - description = "", - properties = new + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateRasterizeJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateRasterizeJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); @@ -174,28 +174,28 @@ public void Example_CreateRasterizeJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateRasterizeJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, - }; - - var operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, + }); + Operation operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); @@ -206,27 +206,27 @@ public async Task Example_CreateRasterizeJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateRasterizeJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetImageProcessingClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ImageProcessing client = new FarmBeatsClient(credential).GetImageProcessingClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - shapefileAttachmentId = "", - shapefileColumnNames = new[] { - "" - }, - name = "", - description = "", - properties = new + ["partyId"] = "", + ["shapefileAttachmentId"] = "", + ["shapefileColumnNames"] = new List() +{ +"" +}, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateRasterizeJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("shapefileAttachmentId").ToString()); @@ -244,7 +244,7 @@ public async Task Example_CreateRasterizeJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_InsightAttachments.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_InsightAttachments.cs index 78a84fa4485e..b2d0299098e7 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_InsightAttachments.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_InsightAttachments.cs @@ -13,6 +13,7 @@ using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,12 +24,11 @@ internal class Samples_InsightAttachments [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - var data = File.OpenRead(""); - - Response response = client.CreateOrUpdate("", "", "", "", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(""); + Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -38,12 +38,11 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); - - var data = File.OpenRead(""); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.CreateOrUpdate("", "", "", "", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -68,12 +67,11 @@ public void Example_CreateOrUpdate_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - var data = File.OpenRead(""); - - Response response = await client.CreateOrUpdateAsync("", "", "", "", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(""); + Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -83,12 +81,11 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); - - var data = File.OpenRead(""); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", "", "", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -113,10 +110,10 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetInsightAttachment() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetInsightAttachment("", "", "", "", "", new RequestContext()); + Response response = client.GetInsightAttachment("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -126,10 +123,10 @@ public void Example_GetInsightAttachment() [Ignore("Only validating compilation of examples")] public void Example_GetInsightAttachment_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetInsightAttachment("", "", "", "", "", new RequestContext()); + Response response = client.GetInsightAttachment("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -154,10 +151,10 @@ public void Example_GetInsightAttachment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetInsightAttachment_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetInsightAttachmentAsync("", "", "", "", "", new RequestContext()); + Response response = await client.GetInsightAttachmentAsync("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -167,10 +164,10 @@ public async Task Example_GetInsightAttachment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetInsightAttachment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetInsightAttachmentAsync("", "", "", "", "", new RequestContext()); + Response response = await client.GetInsightAttachmentAsync("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("insightId").ToString()); @@ -195,8 +192,8 @@ public async Task Example_GetInsightAttachment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); Console.WriteLine(response.Status); @@ -206,8 +203,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); Console.WriteLine(response.Status); @@ -217,8 +214,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); Console.WriteLine(response.Status); @@ -228,8 +225,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); Console.WriteLine(response.Status); @@ -239,13 +236,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Download() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.Download("", "", "", "", "", new RequestContext()); + Response response = client.Download("", "", "", "", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -256,13 +253,13 @@ public void Example_Download() [Ignore("Only validating compilation of examples")] public void Example_Download_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = client.Download("", "", "", "", "", new RequestContext()); + Response response = client.Download("", "", "", "", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -273,13 +270,13 @@ public void Example_Download_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Download_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.DownloadAsync("", "", "", "", "", new RequestContext()); + Response response = await client.DownloadAsync("", "", "", "", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -290,13 +287,13 @@ public async Task Example_Download_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Download_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.DownloadAsync("", "", "", "", "", new RequestContext()); + Response response = await client.DownloadAsync("", "", "", "", "", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -307,13 +304,13 @@ public async Task Example_Download_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetInsightAttachmentsByPartyIdModelIdAndResource() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetInsightAttachmentsByPartyIdModelIdAndResource("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResource("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("insightId").ToString()); + Console.WriteLine(result[0].GetProperty("insightId").ToString()); } } @@ -321,28 +318,43 @@ public void Example_GetInsightAttachmentsByPartyIdModelIdAndResource() [Ignore("Only validating compilation of examples")] public void Example_GetInsightAttachmentsByPartyIdModelIdAndResource_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetInsightAttachmentsByPartyIdModelIdAndResource("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResource("", "", "", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("insightId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("insightId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); } } @@ -350,13 +362,13 @@ public void Example_GetInsightAttachmentsByPartyIdModelIdAndResource_AllParamete [Ignore("Only validating compilation of examples")] public async Task Example_GetInsightAttachmentsByPartyIdModelIdAndResource_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("insightId").ToString()); + Console.WriteLine(result[0].GetProperty("insightId").ToString()); } } @@ -364,28 +376,43 @@ public async Task Example_GetInsightAttachmentsByPartyIdModelIdAndResource_Async [Ignore("Only validating compilation of examples")] public async Task Example_GetInsightAttachmentsByPartyIdModelIdAndResource_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + InsightAttachments client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("", "", "", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("", "", "", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("insightId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("originalFileName").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("insightId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("originalFileName").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Insights.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Insights.cs index e570e60be2b1..9bf31b01c7d9 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Insights.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Insights.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Insights [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,10 +62,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -101,12 +101,11 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", "", "", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -116,32 +115,31 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - modelVersion = "", - insightStartDateTime = "2022-05-10T18:57:31.2311892Z", - insightEndDateTime = "2022-05-10T18:57:31.2311892Z", - measurements = new + ["modelVersion"] = "", + ["insightStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["insightEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["measurements"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", "", "", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -152,8 +150,8 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -163,19 +161,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", "", "", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -185,32 +182,31 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - modelVersion = "", - insightStartDateTime = "2022-05-10T18:57:31.2311892Z", - insightEndDateTime = "2022-05-10T18:57:31.2311892Z", - measurements = new + ["modelVersion"] = "", + ["insightStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["insightEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["measurements"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", "", "", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", "", "", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -221,8 +217,8 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -232,17 +228,17 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetInsight() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetInsight("", "", "", "", "", new RequestContext()); + Response response = client.GetInsight("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -252,10 +248,10 @@ public void Example_GetInsight() [Ignore("Only validating compilation of examples")] public void Example_GetInsight_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetInsight("", "", "", "", "", new RequestContext()); + Response response = client.GetInsight("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -266,8 +262,8 @@ public void Example_GetInsight_AllParameters() Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -277,17 +273,17 @@ public void Example_GetInsight_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetInsight_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetInsightAsync("", "", "", "", "", new RequestContext()); + Response response = await client.GetInsightAsync("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -297,10 +293,10 @@ public async Task Example_GetInsight_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetInsight_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetInsightAsync("", "", "", "", "", new RequestContext()); + Response response = await client.GetInsightAsync("", "", "", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -311,8 +307,8 @@ public async Task Example_GetInsight_AllParameters_Async() Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -322,15 +318,15 @@ public async Task Example_GetInsight_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); Console.WriteLine(response.Status); @@ -340,8 +336,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", "", "", "", ""); Console.WriteLine(response.Status); @@ -351,8 +347,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); Console.WriteLine(response.Status); @@ -362,8 +358,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", "", "", "", ""); Console.WriteLine(response.Status); @@ -373,13 +369,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetInsightsByPartyIdModelIdAndResource() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetInsightsByPartyIdModelIdAndResource("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetInsightsByPartyIdModelIdAndResource("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -387,32 +383,47 @@ public void Example_GetInsightsByPartyIdModelIdAndResource() [Ignore("Only validating compilation of examples")] public void Example_GetInsightsByPartyIdModelIdAndResource_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetInsightsByPartyIdModelIdAndResource("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetInsightsByPartyIdModelIdAndResource("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("modelVersion").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("modelVersion").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("insightStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("insightEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -420,13 +431,13 @@ public void Example_GetInsightsByPartyIdModelIdAndResource_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetInsightsByPartyIdModelIdAndResource_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetInsightsByPartyIdModelIdAndResourceAsync("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetInsightsByPartyIdModelIdAndResourceAsync("", "", "", "", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -434,32 +445,47 @@ public async Task Example_GetInsightsByPartyIdModelIdAndResource_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetInsightsByPartyIdModelIdAndResource_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetInsightsByPartyIdModelIdAndResourceAsync("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetInsightsByPartyIdModelIdAndResourceAsync("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("modelVersion").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("insightStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("insightEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("resourceType").ToString()); + Console.WriteLine(result[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("modelVersion").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("insightStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("insightEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -467,12 +493,12 @@ public async Task Example_GetInsightsByPartyIdModelIdAndResource_AllParameters_A [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -483,12 +509,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -508,12 +534,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -524,12 +550,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetInsightsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Insights client = new FarmBeatsClient(credential).GetInsightsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ManagementZones.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ManagementZones.cs index c4905b788298..9775e9c185b7 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ManagementZones.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ManagementZones.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_ManagementZones [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -62,10 +62,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -101,10 +101,10 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetManagementZone() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetManagementZone("", "", new RequestContext()); + Response response = client.GetManagementZone("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -114,10 +114,10 @@ public void Example_GetManagementZone() [Ignore("Only validating compilation of examples")] public void Example_GetManagementZone_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetManagementZone("", "", new RequestContext()); + Response response = client.GetManagementZone("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -135,17 +135,17 @@ public void Example_GetManagementZone_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetManagementZone_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetManagementZoneAsync("", "", new RequestContext()); + Response response = await client.GetManagementZoneAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -155,10 +155,10 @@ public async Task Example_GetManagementZone_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetManagementZone_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetManagementZoneAsync("", "", new RequestContext()); + Response response = await client.GetManagementZoneAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -176,19 +176,18 @@ public async Task Example_GetManagementZone_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -198,26 +197,25 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -235,19 +233,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -257,26 +254,25 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -294,15 +290,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -312,8 +308,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -323,8 +319,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -334,8 +330,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -345,13 +341,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetManagementZones() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetManagementZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetManagementZones(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -359,28 +355,55 @@ public void Example_GetManagementZones() [Ignore("Only validating compilation of examples")] public void Example_GetManagementZones_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetManagementZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetManagementZones(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -388,13 +411,13 @@ public void Example_GetManagementZones_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetManagementZones_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetManagementZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetManagementZonesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -402,28 +425,55 @@ public async Task Example_GetManagementZones_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetManagementZones_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetManagementZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetManagementZonesAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -431,13 +481,13 @@ public async Task Example_GetManagementZones_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetManagementZonesByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetManagementZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetManagementZonesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -445,28 +495,55 @@ public void Example_GetManagementZonesByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetManagementZonesByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetManagementZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetManagementZonesByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -474,13 +551,13 @@ public void Example_GetManagementZonesByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetManagementZonesByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetManagementZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetManagementZonesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -488,28 +565,55 @@ public async Task Example_GetManagementZonesByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetManagementZonesByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetManagementZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetManagementZonesByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -517,12 +621,12 @@ public async Task Example_GetManagementZonesByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -533,12 +637,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -558,12 +662,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -574,12 +678,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetManagementZonesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + ManagementZones client = new FarmBeatsClient(credential).GetManagementZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ModelInference.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ModelInference.cs index 4500a4edb2b3..2e2b364ceb53 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ModelInference.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_ModelInference.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_ModelInference [Ignore("Only validating compilation of examples")] public void Example_GetBiomassModelJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetBiomassModelJob("", new RequestContext()); + Response response = client.GetBiomassModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -46,10 +46,10 @@ public void Example_GetBiomassModelJob() [Ignore("Only validating compilation of examples")] public void Example_GetBiomassModelJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetBiomassModelJob("", new RequestContext()); + Response response = client.GetBiomassModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -76,17 +76,17 @@ public void Example_GetBiomassModelJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetBiomassModelJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetBiomassModelJobAsync("", new RequestContext()); + Response response = await client.GetBiomassModelJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -106,10 +106,10 @@ public async Task Example_GetBiomassModelJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetBiomassModelJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetBiomassModelJobAsync("", new RequestContext()); + Response response = await client.GetBiomassModelJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -136,17 +136,17 @@ public async Task Example_GetBiomassModelJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetSensorPlacementModelJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorPlacementModelJob("", new RequestContext()); + Response response = client.GetSensorPlacementModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -164,10 +164,10 @@ public void Example_GetSensorPlacementModelJob() [Ignore("Only validating compilation of examples")] public void Example_GetSensorPlacementModelJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorPlacementModelJob("", new RequestContext()); + Response response = client.GetSensorPlacementModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -192,17 +192,17 @@ public void Example_GetSensorPlacementModelJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorPlacementModelJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorPlacementModelJobAsync("", new RequestContext()); + Response response = await client.GetSensorPlacementModelJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -220,10 +220,10 @@ public async Task Example_GetSensorPlacementModelJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorPlacementModelJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorPlacementModelJobAsync("", new RequestContext()); + Response response = await client.GetSensorPlacementModelJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -248,17 +248,17 @@ public async Task Example_GetSensorPlacementModelJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetSoilMoistureModelJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSoilMoistureModelJob("", new RequestContext()); + Response response = client.GetSoilMoistureModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -281,10 +281,10 @@ public void Example_GetSoilMoistureModelJob() [Ignore("Only validating compilation of examples")] public void Example_GetSoilMoistureModelJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSoilMoistureModelJob("", new RequestContext()); + Response response = client.GetSoilMoistureModelJob("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -314,17 +314,17 @@ public void Example_GetSoilMoistureModelJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSoilMoistureModelJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSoilMoistureModelJobAsync("", new RequestContext()); + Response response = await client.GetSoilMoistureModelJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -347,10 +347,10 @@ public async Task Example_GetSoilMoistureModelJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSoilMoistureModelJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSoilMoistureModelJobAsync("", new RequestContext()); + Response response = await client.GetSoilMoistureModelJobAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -380,34 +380,33 @@ public async Task Example_GetSoilMoistureModelJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateBiomassModelJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - }; - - var operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + }); + Operation operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -426,33 +425,32 @@ public void Example_CreateBiomassModelJob() [Ignore("Only validating compilation of examples")] public void Example_CreateBiomassModelJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - name = "", - description = "", - properties = new + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateBiomassModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -478,34 +476,33 @@ public void Example_CreateBiomassModelJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateBiomassModelJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - }; - - var operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + }); + Operation operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -524,33 +521,32 @@ public async Task Example_CreateBiomassModelJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateBiomassModelJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - cropName = "Corn", - plantingStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - weatherExtensionId = "", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - name = "", - description = "", - properties = new + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["cropName"] = "Corn", + ["plantingStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["weatherExtensionId"] = "", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateBiomassModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -576,32 +572,31 @@ public async Task Example_CreateBiomassModelJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateSensorPlacementModelJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, - }; - - var operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, + }); + Operation operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -618,31 +613,30 @@ public void Example_CreateSensorPlacementModelJob() [Ignore("Only validating compilation of examples")] public void Example_CreateSensorPlacementModelJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, - name = "", - description = "", - properties = new + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateSensorPlacementModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -666,32 +660,31 @@ public void Example_CreateSensorPlacementModelJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateSensorPlacementModelJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, - }; - - var operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, + }); + Operation operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -708,31 +701,30 @@ public async Task Example_CreateSensorPlacementModelJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateSensorPlacementModelJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - modelVersion = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - sensorType = "", - isRanked = true, - name = "", - description = "", - properties = new + ["partyId"] = "", + ["boundaryId"] = "", + ["modelVersion"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["sensorType"] = "", + ["isRanked"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateSensorPlacementModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -756,40 +748,39 @@ public async Task Example_CreateSensorPlacementModelJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateSoilMoistureModelJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, - }; - - var operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -811,39 +802,38 @@ public void Example_CreateSoilMoistureModelJob() [Ignore("Only validating compilation of examples")] public void Example_CreateSoilMoistureModelJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, - name = "", - description = "", - properties = new + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateSoilMoistureModelJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -872,40 +862,39 @@ public void Example_CreateSoilMoistureModelJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateSoilMoistureModelJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, - }; - - var operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -927,39 +916,38 @@ public async Task Example_CreateSoilMoistureModelJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateSoilMoistureModelJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetModelInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + ModelInference client = new FarmBeatsClient(credential).GetModelInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - sensorDataModelId = "", - sensorPartnerId = "", - inferenceStartDateTime = "2022-05-10T18:57:31.2311892Z", - inferenceEndDateTime = "2022-05-10T18:57:31.2311892Z", - satelliteProvider = "Microsoft", - satelliteSource = "Sentinel_2_L2A", - imageResolution = 123.45d, - imageFormat = "TIF", - modelVersion = "", - sensorDefinition = new + ["partyId"] = "", + ["boundaryId"] = "", + ["sensorDataModelId"] = "", + ["sensorPartnerId"] = "", + ["inferenceStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["inferenceEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["satelliteProvider"] = "Microsoft", + ["satelliteSource"] = "Sentinel_2_L2A", + ["imageResolution"] = 123.45, + ["imageFormat"] = "TIF", + ["modelVersion"] = "", + ["sensorDefinition"] = new Dictionary() { - sensorMeasurement = "", - minProperty = "", - maxProperty = "", + ["sensorMeasurement"] = "", + ["minProperty"] = "", + ["maxProperty"] = "", }, - name = "", - description = "", - properties = new + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateSoilMoistureModelJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -988,7 +976,7 @@ public async Task Example_CreateSoilMoistureModelJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_NutrientAnalyses.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_NutrientAnalyses.cs index 91c0a242ea5c..d77964154c3e 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_NutrientAnalyses.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_NutrientAnalyses.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_NutrientAnalyses [Ignore("Only validating compilation of examples")] public void Example_GetNutrientAnalysis() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetNutrientAnalysis("", "", new RequestContext()); + Response response = client.GetNutrientAnalysis("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetNutrientAnalysis() [Ignore("Only validating compilation of examples")] public void Example_GetNutrientAnalysis_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetNutrientAnalysis("", "", new RequestContext()); + Response response = client.GetNutrientAnalysis("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -64,17 +64,17 @@ public void Example_GetNutrientAnalysis_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetNutrientAnalysis_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetNutrientAnalysisAsync("", "", new RequestContext()); + Response response = await client.GetNutrientAnalysisAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -84,10 +84,10 @@ public async Task Example_GetNutrientAnalysis_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetNutrientAnalysis_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetNutrientAnalysisAsync("", "", new RequestContext()); + Response response = await client.GetNutrientAnalysisAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -112,19 +112,18 @@ public async Task Example_GetNutrientAnalysis_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -134,37 +133,38 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - parentId = "", - parentType = "PlantTissueAnalysis", - unit = "", - value = 123.45d, - referenceValueLow = 123.45d, - referenceValueHigh = 123.45d, - classification = "", - recommendation = "", - products = new[] { - new { - rate = "", - instruction = "", - product = "", - } - }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["parentId"] = "", + ["parentType"] = "PlantTissueAnalysis", + ["unit"] = "", + ["value"] = 123.45, + ["referenceValueLow"] = 123.45, + ["referenceValueHigh"] = 123.45, + ["classification"] = "", + ["recommendation"] = "", + ["products"] = new List() +{ +new Dictionary() +{ +["rate"] = "", +["instruction"] = "", +["product"] = "", +} +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -189,19 +189,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -211,37 +210,38 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - parentId = "", - parentType = "PlantTissueAnalysis", - unit = "", - value = 123.45d, - referenceValueLow = 123.45d, - referenceValueHigh = 123.45d, - classification = "", - recommendation = "", - products = new[] { - new { - rate = "", - instruction = "", - product = "", - } - }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["parentId"] = "", + ["parentType"] = "PlantTissueAnalysis", + ["unit"] = "", + ["value"] = 123.45, + ["referenceValueLow"] = 123.45, + ["referenceValueHigh"] = 123.45, + ["classification"] = "", + ["recommendation"] = "", + ["products"] = new List() +{ +new Dictionary() +{ +["rate"] = "", +["instruction"] = "", +["product"] = "", +} +}, + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -266,15 +266,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -284,8 +284,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -295,8 +295,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -306,8 +306,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -317,13 +317,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetNutrientAnalyses() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetNutrientAnalyses("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetNutrientAnalyses(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -331,35 +331,53 @@ public void Example_GetNutrientAnalyses() [Ignore("Only validating compilation of examples")] public void Example_GetNutrientAnalyses_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetNutrientAnalyses("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetNutrientAnalyses("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -367,13 +385,13 @@ public void Example_GetNutrientAnalyses_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetNutrientAnalyses_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetNutrientAnalysesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetNutrientAnalysesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -381,35 +399,53 @@ public async Task Example_GetNutrientAnalyses_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetNutrientAnalyses_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetNutrientAnalysesAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetNutrientAnalysesAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -417,13 +453,13 @@ public async Task Example_GetNutrientAnalyses_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetNutrientAnalysesByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetNutrientAnalysesByPartyId("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetNutrientAnalysesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -431,35 +467,53 @@ public void Example_GetNutrientAnalysesByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetNutrientAnalysesByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetNutrientAnalysesByPartyId("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetNutrientAnalysesByPartyId("", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -467,13 +521,13 @@ public void Example_GetNutrientAnalysesByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetNutrientAnalysesByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetNutrientAnalysesByPartyIdAsync("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetNutrientAnalysesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -481,35 +535,53 @@ public async Task Example_GetNutrientAnalysesByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetNutrientAnalysesByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetNutrientAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + NutrientAnalyses client = new FarmBeatsClient(credential).GetNutrientAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetNutrientAnalysesByPartyIdAsync("", "", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetNutrientAnalysesByPartyIdAsync("", "", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("parentId").ToString()); - Console.WriteLine(result.GetProperty("parentType").ToString()); - Console.WriteLine(result.GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("referenceValueLow").ToString()); - Console.WriteLine(result.GetProperty("referenceValueHigh").ToString()); - Console.WriteLine(result.GetProperty("classification").ToString()); - Console.WriteLine(result.GetProperty("recommendation").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("rate").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("instruction").ToString()); - Console.WriteLine(result.GetProperty("products")[0].GetProperty("product").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("parentId").ToString()); + Console.WriteLine(result[0].GetProperty("parentType").ToString()); + Console.WriteLine(result[0].GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueLow").ToString()); + Console.WriteLine(result[0].GetProperty("referenceValueHigh").ToString()); + Console.WriteLine(result[0].GetProperty("classification").ToString()); + Console.WriteLine(result[0].GetProperty("recommendation").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("rate").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("instruction").ToString()); + Console.WriteLine(result[0].GetProperty("products")[0].GetProperty("product").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_OAuthProviders.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_OAuthProviders.cs index b32e17b2ea43..3d287952df37 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_OAuthProviders.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_OAuthProviders.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_OAuthProviders [Ignore("Only validating compilation of examples")] public void Example_GetOAuthProvider() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetOAuthProvider("", new RequestContext()); + Response response = client.GetOAuthProvider("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetOAuthProvider() [Ignore("Only validating compilation of examples")] public void Example_GetOAuthProvider_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetOAuthProvider("", new RequestContext()); + Response response = client.GetOAuthProvider("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -54,17 +54,17 @@ public void Example_GetOAuthProvider_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetOAuthProvider_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetOAuthProviderAsync("", new RequestContext()); + Response response = await client.GetOAuthProviderAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -74,10 +74,10 @@ public async Task Example_GetOAuthProvider_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOAuthProvider_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetOAuthProviderAsync("", new RequestContext()); + Response response = await client.GetOAuthProviderAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -92,19 +92,18 @@ public async Task Example_GetOAuthProvider_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -114,24 +113,23 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - appId = "", - appSecret = "", - apiKey = "", - isProductionApp = true, - name = "", - description = "", - properties = new + ["appId"] = "", + ["appSecret"] = "", + ["apiKey"] = "", + ["isProductionApp"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -146,19 +144,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -168,24 +165,23 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - appId = "", - appSecret = "", - apiKey = "", - isProductionApp = true, - name = "", - description = "", - properties = new + ["appId"] = "", + ["appSecret"] = "", + ["apiKey"] = "", + ["isProductionApp"] = true, + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("appId").ToString()); @@ -200,15 +196,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -218,8 +214,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -229,8 +225,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -240,8 +236,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -251,10 +247,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); @@ -264,10 +260,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); @@ -284,17 +280,17 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); @@ -304,10 +300,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); @@ -324,20 +320,20 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetOAuthProviders() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetOAuthProviders(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetOAuthProviders(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -345,25 +341,37 @@ public void Example_GetOAuthProviders() [Ignore("Only validating compilation of examples")] public void Example_GetOAuthProviders_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetOAuthProviders(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetOAuthProviders(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("appId").ToString()); - Console.WriteLine(result.GetProperty("appSecret").ToString()); - Console.WriteLine(result.GetProperty("apiKey").ToString()); - Console.WriteLine(result.GetProperty("isProductionApp").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("appId").ToString()); + Console.WriteLine(result[0].GetProperty("appSecret").ToString()); + Console.WriteLine(result[0].GetProperty("apiKey").ToString()); + Console.WriteLine(result[0].GetProperty("isProductionApp").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -371,13 +379,13 @@ public void Example_GetOAuthProviders_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetOAuthProviders_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetOAuthProvidersAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetOAuthProvidersAsync(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -385,25 +393,37 @@ public async Task Example_GetOAuthProviders_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOAuthProviders_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetOAuthProvidersAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetOAuthProvidersAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("appId").ToString()); - Console.WriteLine(result.GetProperty("appSecret").ToString()); - Console.WriteLine(result.GetProperty("apiKey").ToString()); - Console.WriteLine(result.GetProperty("isProductionApp").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("appId").ToString()); + Console.WriteLine(result[0].GetProperty("appSecret").ToString()); + Console.WriteLine(result[0].GetProperty("apiKey").ToString()); + Console.WriteLine(result[0].GetProperty("isProductionApp").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -411,12 +431,12 @@ public async Task Example_GetOAuthProviders_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); } @@ -425,12 +445,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -446,19 +466,19 @@ public void Example_CreateCascadeDeleteJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); } @@ -467,12 +487,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetOAuthProvidersClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + OAuthProviders client = new FarmBeatsClient(credential).GetOAuthProvidersClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("oauthProviderId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -488,7 +508,7 @@ public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Parties.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Parties.cs index b06e35f2e3ca..a5fd68cfcdcb 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Parties.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Parties.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Parties [Ignore("Only validating compilation of examples")] public void Example_GetParty() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetParty("", new RequestContext()); + Response response = client.GetParty("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetParty() [Ignore("Only validating compilation of examples")] public void Example_GetParty_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetParty("", new RequestContext()); + Response response = client.GetParty("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -52,17 +52,17 @@ public void Example_GetParty_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetParty_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPartyAsync("", new RequestContext()); + Response response = await client.GetPartyAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -72,10 +72,10 @@ public async Task Example_GetParty_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetParty_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPartyAsync("", new RequestContext()); + Response response = await client.GetPartyAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -88,19 +88,18 @@ public async Task Example_GetParty_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -110,22 +109,21 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -138,19 +136,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -160,22 +157,21 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -188,15 +184,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -206,8 +202,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -217,8 +213,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -228,8 +224,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -239,10 +235,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -254,10 +250,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -278,10 +274,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -293,10 +289,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -317,13 +313,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetParties() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetParties(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetParties(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -331,23 +327,35 @@ public void Example_GetParties() [Ignore("Only validating compilation of examples")] public void Example_GetParties_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetParties(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetParties(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -355,13 +363,13 @@ public void Example_GetParties_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetParties_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPartiesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPartiesAsync(null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -369,23 +377,35 @@ public async Task Example_GetParties_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetParties_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPartiesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPartiesAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -393,12 +413,12 @@ public async Task Example_GetParties_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -409,12 +429,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -434,12 +454,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -450,12 +470,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPartiesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Parties client = new FarmBeatsClient(credential).GetPartiesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantTissueAnalyses.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantTissueAnalyses.cs index 6396d6d6b537..65b5bb71ba3d 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantTissueAnalyses.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantTissueAnalyses.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_PlantTissueAnalyses [Ignore("Only validating compilation of examples")] public void Example_GetPlantTissueAnalysis() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPlantTissueAnalysis("", "", new RequestContext()); + Response response = client.GetPlantTissueAnalysis("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetPlantTissueAnalysis() [Ignore("Only validating compilation of examples")] public void Example_GetPlantTissueAnalysis_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPlantTissueAnalysis("", "", new RequestContext()); + Response response = client.GetPlantTissueAnalysis("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -71,17 +71,17 @@ public void Example_GetPlantTissueAnalysis_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantTissueAnalysis_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPlantTissueAnalysisAsync("", "", new RequestContext()); + Response response = await client.GetPlantTissueAnalysisAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -91,10 +91,10 @@ public async Task Example_GetPlantTissueAnalysis_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantTissueAnalysis_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPlantTissueAnalysisAsync("", "", new RequestContext()); + Response response = await client.GetPlantTissueAnalysisAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -126,19 +126,18 @@ public async Task Example_GetPlantTissueAnalysis_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -148,42 +147,41 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - fieldId = "", - cropId = "", - cropProductId = "", - seasonId = "", - plantingDateTime = "2022-05-10T18:57:31.2311892Z", - growthStage = "", - plantPart = "", - plantPosition = "", - plantAppearance = "", - sampleCollectionCondition = "", - sampleCollectionDateTime = "2022-05-10T18:57:31.2311892Z", - sampleReceivedDateTime = "2022-05-10T18:57:31.2311892Z", - sampleTestResultDateTime = "2022-05-10T18:57:31.2311892Z", - labDetails = new + ["fieldId"] = "", + ["cropId"] = "", + ["cropProductId"] = "", + ["seasonId"] = "", + ["plantingDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["growthStage"] = "", + ["plantPart"] = "", + ["plantPosition"] = "", + ["plantAppearance"] = "", + ["sampleCollectionCondition"] = "", + ["sampleCollectionDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleReceivedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleTestResultDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["labDetails"] = new Dictionary() { - code = "", - name = "", - description = "", - address = "
", + ["code"] = "", + ["name"] = "", + ["description"] = "", + ["address"] = "
", }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -215,19 +213,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -237,42 +234,41 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - fieldId = "", - cropId = "", - cropProductId = "", - seasonId = "", - plantingDateTime = "2022-05-10T18:57:31.2311892Z", - growthStage = "", - plantPart = "", - plantPosition = "", - plantAppearance = "", - sampleCollectionCondition = "", - sampleCollectionDateTime = "2022-05-10T18:57:31.2311892Z", - sampleReceivedDateTime = "2022-05-10T18:57:31.2311892Z", - sampleTestResultDateTime = "2022-05-10T18:57:31.2311892Z", - labDetails = new + ["fieldId"] = "", + ["cropId"] = "", + ["cropProductId"] = "", + ["seasonId"] = "", + ["plantingDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["growthStage"] = "", + ["plantPart"] = "", + ["plantPosition"] = "", + ["plantAppearance"] = "", + ["sampleCollectionCondition"] = "", + ["sampleCollectionDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleReceivedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["sampleTestResultDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["labDetails"] = new Dictionary() { - code = "", - name = "", - description = "", - address = "
", + ["code"] = "", + ["name"] = "", + ["description"] = "", + ["address"] = "
", }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -304,15 +300,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -322,8 +318,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -333,8 +329,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -344,8 +340,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -355,10 +351,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -370,10 +366,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -394,10 +390,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -409,10 +405,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -433,13 +429,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetPlantTissueAnalysesByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPlantTissueAnalysesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -447,42 +443,66 @@ public void Example_GetPlantTissueAnalysesByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetPlantTissueAnalysesByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPlantTissueAnalysesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -490,13 +510,13 @@ public void Example_GetPlantTissueAnalysesByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantTissueAnalysesByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPlantTissueAnalysesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -504,42 +524,66 @@ public async Task Example_GetPlantTissueAnalysesByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantTissueAnalysesByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPlantTissueAnalysesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPlantTissueAnalysesByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -547,13 +591,13 @@ public async Task Example_GetPlantTissueAnalysesByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetPlantTissueAnalyses() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPlantTissueAnalyses(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPlantTissueAnalyses(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -561,42 +605,66 @@ public void Example_GetPlantTissueAnalyses() [Ignore("Only validating compilation of examples")] public void Example_GetPlantTissueAnalyses_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPlantTissueAnalyses(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPlantTissueAnalyses(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -604,13 +672,13 @@ public void Example_GetPlantTissueAnalyses_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantTissueAnalyses_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPlantTissueAnalysesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPlantTissueAnalysesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -618,42 +686,66 @@ public async Task Example_GetPlantTissueAnalyses_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantTissueAnalyses_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPlantTissueAnalysesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPlantTissueAnalysesAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("cropProductId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("plantingDateTime").ToString()); - Console.WriteLine(result.GetProperty("growthStage").ToString()); - Console.WriteLine(result.GetProperty("plantPart").ToString()); - Console.WriteLine(result.GetProperty("plantPosition").ToString()); - Console.WriteLine(result.GetProperty("plantAppearance").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionCondition").ToString()); - Console.WriteLine(result.GetProperty("sampleCollectionDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleReceivedDateTime").ToString()); - Console.WriteLine(result.GetProperty("sampleTestResultDateTime").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("labDetails").GetProperty("address").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("plantingDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("growthStage").ToString()); + Console.WriteLine(result[0].GetProperty("plantPart").ToString()); + Console.WriteLine(result[0].GetProperty("plantPosition").ToString()); + Console.WriteLine(result[0].GetProperty("plantAppearance").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionCondition").ToString()); + Console.WriteLine(result[0].GetProperty("sampleCollectionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleReceivedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("sampleTestResultDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("labDetails").GetProperty("address").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -661,12 +753,12 @@ public async Task Example_GetPlantTissueAnalyses_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -677,12 +769,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -702,12 +794,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -718,12 +810,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantTissueAnalyses client = new FarmBeatsClient(credential).GetPlantTissueAnalysesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantingData.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantingData.cs index f4c339a465b7..5648dc4e4d6e 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantingData.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PlantingData.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_PlantingData [Ignore("Only validating compilation of examples")] public void Example_GetPlantingData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPlantingData("", "", new RequestContext()); + Response response = client.GetPlantingData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetPlantingData() [Ignore("Only validating compilation of examples")] public void Example_GetPlantingData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPlantingData("", "", new RequestContext()); + Response response = client.GetPlantingData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -73,17 +73,17 @@ public void Example_GetPlantingData_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantingData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPlantingDataAsync("", "", new RequestContext()); + Response response = await client.GetPlantingDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -93,10 +93,10 @@ public async Task Example_GetPlantingData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPlantingData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPlantingDataAsync("", "", new RequestContext()); + Response response = await client.GetPlantingDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -130,19 +130,18 @@ public async Task Example_GetPlantingData_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -152,63 +151,49 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - avgPlantingRate = new - { - unit = "", - value = 123.45d, - }, - totalMaterial = new - { - unit = "", - value = 123.45d, - }, - avgMaterial = new - { - unit = "", - value = 123.45d, - }, - plantingProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new + ["avgPlantingRate"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["totalMaterial"] = null + , + ["avgMaterial"] = null + , + ["plantingProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalMaterial"] = null +, +["avgMaterial"] = null +, +} +}, + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -242,19 +227,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -264,63 +248,49 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - avgPlantingRate = new - { - unit = "", - value = 123.45d, - }, - totalMaterial = new - { - unit = "", - value = 123.45d, - }, - avgMaterial = new + ["avgPlantingRate"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - plantingProductDetails = new[] { - new { - productName = "", - area = new { - unit = "", - value = 123.45d, - }, - totalMaterial = new { - unit = "", - value = 123.45d, - }, - avgMaterial = new { - unit = "", - value = 123.45d, - }, - } - }, - area = new - { - unit = "", - value = 123.45d, - }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["totalMaterial"] = null + , + ["avgMaterial"] = null + , + ["plantingProductDetails"] = new List() +{ +new Dictionary() +{ +["productName"] = "", +["area"] = null +, +["totalMaterial"] = null +, +["avgMaterial"] = null +, +} +}, + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); @@ -354,15 +324,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -372,8 +342,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -383,8 +353,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -394,8 +364,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -405,10 +375,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -420,10 +390,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -444,10 +414,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -459,10 +429,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -483,13 +453,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllPlantingDataByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllPlantingDataByPartyId("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllPlantingDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -497,44 +467,62 @@ public void Example_GetAllPlantingDataByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetAllPlantingDataByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllPlantingDataByPartyId("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllPlantingDataByPartyId("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -542,13 +530,13 @@ public void Example_GetAllPlantingDataByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllPlantingDataByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllPlantingDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllPlantingDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -556,44 +544,62 @@ public async Task Example_GetAllPlantingDataByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllPlantingDataByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllPlantingDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllPlantingDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -601,13 +607,13 @@ public async Task Example_GetAllPlantingDataByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllPlantingData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllPlantingData(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllPlantingData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -615,44 +621,62 @@ public void Example_GetAllPlantingData() [Ignore("Only validating compilation of examples")] public void Example_GetAllPlantingData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllPlantingData(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllPlantingData(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -660,13 +684,13 @@ public void Example_GetAllPlantingData_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllPlantingData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllPlantingDataAsync(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllPlantingDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -674,44 +698,62 @@ public async Task Example_GetAllPlantingData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllPlantingData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllPlantingDataAsync(3.14, 3.14, 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllPlantingDataAsync(123.45, 123.45, 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgPlantingRate").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgPlantingRate").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("totalMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("plantingProductDetails")[0].GetProperty("avgMaterial").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -719,12 +761,12 @@ public async Task Example_GetAllPlantingData_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -735,12 +777,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -760,12 +802,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -776,12 +818,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPlantingDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PlantingData client = new FarmBeatsClient(credential).GetPlantingDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PrescriptionMaps.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PrescriptionMaps.cs index fbc65e295cc6..e47b723c386d 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PrescriptionMaps.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_PrescriptionMaps.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_PrescriptionMaps [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionMap() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPrescriptionMap("", "", new RequestContext()); + Response response = client.GetPrescriptionMap("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetPrescriptionMap() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionMap_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPrescriptionMap("", "", new RequestContext()); + Response response = client.GetPrescriptionMap("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -57,17 +57,17 @@ public void Example_GetPrescriptionMap_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionMap_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPrescriptionMapAsync("", "", new RequestContext()); + Response response = await client.GetPrescriptionMapAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -77,10 +77,10 @@ public async Task Example_GetPrescriptionMap_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionMap_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPrescriptionMapAsync("", "", new RequestContext()); + Response response = await client.GetPrescriptionMapAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -98,19 +98,18 @@ public async Task Example_GetPrescriptionMap_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -120,26 +119,25 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -157,19 +155,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -179,26 +176,25 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - seasonId = "", - cropId = "", - fieldId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["seasonId"] = "", + ["cropId"] = "", + ["fieldId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -216,15 +212,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -234,8 +230,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -245,8 +241,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -256,8 +252,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -267,10 +263,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -282,10 +278,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -306,10 +302,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -321,10 +317,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -345,13 +341,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionMapsByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptionMapsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptionMapsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -359,28 +355,55 @@ public void Example_GetPrescriptionMapsByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionMapsByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptionMapsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptionMapsByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -388,13 +411,13 @@ public void Example_GetPrescriptionMapsByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionMapsByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionMapsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionMapsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -402,28 +425,55 @@ public async Task Example_GetPrescriptionMapsByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionMapsByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionMapsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionMapsByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -431,13 +481,13 @@ public async Task Example_GetPrescriptionMapsByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionMaps() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptionMaps(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptionMaps(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -445,28 +495,55 @@ public void Example_GetPrescriptionMaps() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionMaps_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptionMaps(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptionMaps(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -474,13 +551,13 @@ public void Example_GetPrescriptionMaps_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionMaps_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionMapsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionMapsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -488,28 +565,55 @@ public async Task Example_GetPrescriptionMaps_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionMaps_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionMapsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionMapsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -517,12 +621,12 @@ public async Task Example_GetPrescriptionMaps_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -533,12 +637,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -558,12 +662,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -574,12 +678,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionMapsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + PrescriptionMaps client = new FarmBeatsClient(credential).GetPrescriptionMapsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Prescriptions.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Prescriptions.cs index 8f891e3171d3..26ee6aee138d 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Prescriptions.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Prescriptions.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Prescriptions [Ignore("Only validating compilation of examples")] public void Example_GetPrescription() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPrescription("", "", new RequestContext()); + Response response = client.GetPrescription("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetPrescription() [Ignore("Only validating compilation of examples")] public void Example_GetPrescription_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetPrescription("", "", new RequestContext()); + Response response = client.GetPrescription("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -47,8 +47,8 @@ public void Example_GetPrescription_AllParameters() Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -59,17 +59,17 @@ public void Example_GetPrescription_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescription_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPrescriptionAsync("", "", new RequestContext()); + Response response = await client.GetPrescriptionAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -79,10 +79,10 @@ public async Task Example_GetPrescription_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescription_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetPrescriptionAsync("", "", new RequestContext()); + Response response = await client.GetPrescriptionAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -90,8 +90,8 @@ public async Task Example_GetPrescription_AllParameters_Async() Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -102,19 +102,18 @@ public async Task Example_GetPrescription_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -124,34 +123,33 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - prescriptionMapId = "", - productCode = "", - productName = "", - type = "", - measurements = new + ["prescriptionMapId"] = "", + ["productCode"] = "", + ["productName"] = "", + ["type"] = "", + ["measurements"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -159,8 +157,8 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -171,19 +169,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -193,34 +190,33 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - prescriptionMapId = "", - productCode = "", - productName = "", - type = "", - measurements = new + ["prescriptionMapId"] = "", + ["productCode"] = "", + ["productName"] = "", + ["type"] = "", + ["measurements"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, }, - status = "", - source = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -228,8 +224,8 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("productCode").ToString()); Console.WriteLine(result.GetProperty("productName").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("eTag").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -240,15 +236,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -258,8 +254,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -269,8 +265,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -280,8 +276,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -291,10 +287,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -306,10 +302,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -330,10 +326,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -345,10 +341,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -369,13 +365,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionsByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptionsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptionsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -383,30 +379,57 @@ public void Example_GetPrescriptionsByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptionsByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptionsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptionsByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -414,13 +437,13 @@ public void Example_GetPrescriptionsByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionsByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -428,30 +451,57 @@ public async Task Example_GetPrescriptionsByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptionsByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionsByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -459,13 +509,13 @@ public async Task Example_GetPrescriptionsByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptions() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptions(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptions(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -473,30 +523,57 @@ public void Example_GetPrescriptions() [Ignore("Only validating compilation of examples")] public void Example_GetPrescriptions_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetPrescriptions(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPrescriptions(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -504,13 +581,13 @@ public void Example_GetPrescriptions_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptions_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -518,30 +595,57 @@ public async Task Example_GetPrescriptions_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPrescriptions_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetPrescriptionsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPrescriptionsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("prescriptionMapId").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("productName").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("prescriptionMapId").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("productName").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measurements").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -549,12 +653,12 @@ public async Task Example_GetPrescriptions_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -565,12 +669,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -590,12 +694,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -606,12 +710,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetPrescriptionsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Prescriptions client = new FarmBeatsClient(credential).GetPrescriptionsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Scenes.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Scenes.cs index d60abcbfcffb..282d52b3242d 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Scenes.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Scenes.cs @@ -13,6 +13,7 @@ using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,13 +24,13 @@ internal class Samples_Scenes [Ignore("Only validating compilation of examples")] public void Example_Download() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = client.Download("", new RequestContext()); + Response response = client.Download("", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -40,13 +41,13 @@ public void Example_Download() [Ignore("Only validating compilation of examples")] public void Example_Download_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = client.Download("", new RequestContext()); + Response response = client.Download("", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -57,13 +58,13 @@ public void Example_Download_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Download_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.DownloadAsync("", new RequestContext()); + Response response = await client.DownloadAsync("", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -74,13 +75,13 @@ public async Task Example_Download_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Download_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.DownloadAsync("", new RequestContext()); + Response response = await client.DownloadAsync("", null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -91,10 +92,10 @@ public async Task Example_Download_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSatelliteDataIngestionJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSatelliteDataIngestionJobDetails("", new RequestContext()); + Response response = client.GetSatelliteDataIngestionJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -108,10 +109,10 @@ public void Example_GetSatelliteDataIngestionJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetSatelliteDataIngestionJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSatelliteDataIngestionJobDetails("", new RequestContext()); + Response response = client.GetSatelliteDataIngestionJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -136,17 +137,17 @@ public void Example_GetSatelliteDataIngestionJobDetails_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSatelliteDataIngestionJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSatelliteDataIngestionJobDetailsAsync("", new RequestContext()); + Response response = await client.GetSatelliteDataIngestionJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -160,10 +161,10 @@ public async Task Example_GetSatelliteDataIngestionJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSatelliteDataIngestionJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSatelliteDataIngestionJobDetailsAsync("", new RequestContext()); + Response response = await client.GetSatelliteDataIngestionJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -188,23 +189,22 @@ public async Task Example_GetSatelliteDataIngestionJobDetails_AllParameters_Asyn Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_SearchFeatures() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - }; - - Response response = client.SearchFeatures("", RequestContent.Create(data)); + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + }); + Response response = client.SearchFeatures("Sentinel_2_L2A", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -213,42 +213,47 @@ public void Example_SearchFeatures() Console.WriteLine(result.GetProperty("features")[0].GetProperty("properties").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("href").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_SearchFeatures_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - intersects = new + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["intersects"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - bbox = new[] { - 123.45d - }, - featureIds = new[] { - "" - }, - }; - - Response response = client.SearchFeatures("", RequestContent.Create(data), 1234, 1234); + ["bbox"] = new List() +{ +123.45 +}, + ["featureIds"] = new List() +{ +"" +}, + }); + Response response = client.SearchFeatures("Sentinel_2_L2A", content, maxpagesize: 1234, skip: 1234); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -262,11 +267,11 @@ public void Example_SearchFeatures_AllParameters() Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("collection").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } @@ -275,16 +280,15 @@ public void Example_SearchFeatures_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_SearchFeatures_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - }; - - Response response = await client.SearchFeaturesAsync("", RequestContent.Create(data)); + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + }); + Response response = await client.SearchFeaturesAsync("Sentinel_2_L2A", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -293,42 +297,47 @@ public async Task Example_SearchFeatures_Async() Console.WriteLine(result.GetProperty("features")[0].GetProperty("properties").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("href").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_SearchFeatures_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - intersects = new + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["intersects"] = new Dictionary() { - coordinates = new[] { - new[] { - new[] { - new[] { - 123.45d - } - } - } - }, - type = "MultiPolygon", + ["coordinates"] = new List() +{ +new List() +{ +new List() +{ +new List() +{ +123.45 +} +} +} +}, + ["type"] = "MultiPolygon", }, - bbox = new[] { - 123.45d - }, - featureIds = new[] { - "" - }, - }; - - Response response = await client.SearchFeaturesAsync("", RequestContent.Create(data), 1234, 1234); + ["bbox"] = new List() +{ +123.45 +}, + ["featureIds"] = new List() +{ +"" +}, + }); + Response response = await client.SearchFeaturesAsync("Sentinel_2_L2A", content, maxpagesize: 1234, skip: 1234); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("features")[0].GetProperty("stacVersion").ToString()); @@ -342,11 +351,11 @@ public async Task Example_SearchFeatures_AllParameters_Async() Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("links")[0].GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("features")[0].GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("features")[0].GetProperty("collection").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } @@ -355,10 +364,10 @@ public async Task Example_SearchFeatures_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetStacFeature() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetStacFeature("", "", new RequestContext()); + Response response = client.GetStacFeature("Sentinel_2_L2A", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("stacVersion").ToString()); @@ -367,17 +376,17 @@ public void Example_GetStacFeature() Console.WriteLine(result.GetProperty("properties").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("href").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetStacFeature_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetStacFeature("", "", new RequestContext()); + Response response = client.GetStacFeature("Sentinel_2_L2A", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("stacVersion").ToString()); @@ -391,11 +400,11 @@ public void Example_GetStacFeature_AllParameters() Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("collection").ToString()); } @@ -403,10 +412,10 @@ public void Example_GetStacFeature_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetStacFeature_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetStacFeatureAsync("", "", new RequestContext()); + Response response = await client.GetStacFeatureAsync("Sentinel_2_L2A", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("stacVersion").ToString()); @@ -415,17 +424,17 @@ public async Task Example_GetStacFeature_Async() Console.WriteLine(result.GetProperty("properties").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("href").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetStacFeature_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetStacFeatureAsync("", "", new RequestContext()); + Response response = await client.GetStacFeatureAsync("Sentinel_2_L2A", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("stacVersion").ToString()); @@ -439,11 +448,11 @@ public async Task Example_GetStacFeature_AllParameters_Async() Console.WriteLine(result.GetProperty("links")[0].GetProperty("rel").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("links")[0].GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("href").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("title").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("").GetProperty("roles")[0].ToString()); Console.WriteLine(result.GetProperty("collection").ToString()); } @@ -451,13 +460,13 @@ public async Task Example_GetStacFeature_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetScenes() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetScenes("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new double[] { 3.14 }, new string[] { "" }, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetScenes("", "", "", "", null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -465,27 +474,36 @@ public void Example_GetScenes() [Ignore("Only validating compilation of examples")] public void Example_GetScenes_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetScenes("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new double[] { 3.14 }, new string[] { "" }, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetScenes("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +123.45 +}, new List() +{ +"" +}, 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sceneDateTime").ToString()); - Console.WriteLine(result.GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); - Console.WriteLine(result.GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("cloudCoverPercentage").ToString()); - Console.WriteLine(result.GetProperty("darkPixelPercentage").ToString()); - Console.WriteLine(result.GetProperty("ndviMedianValue").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("sceneDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); + Console.WriteLine(result[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCoverPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("darkPixelPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("ndviMedianValue").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); } } @@ -493,13 +511,13 @@ public void Example_GetScenes_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetScenes_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetScenesAsync("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new double[] { 3.14 }, new string[] { "" }, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetScenesAsync("", "", "", "", null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -507,27 +525,36 @@ public async Task Example_GetScenes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetScenes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetScenesAsync("", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new double[] { 3.14 }, new string[] { "" }, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetScenesAsync("", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +123.45 +}, new List() +{ +"" +}, 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sceneDateTime").ToString()); - Console.WriteLine(result.GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); - Console.WriteLine(result.GetProperty("imageFormat").ToString()); - Console.WriteLine(result.GetProperty("cloudCoverPercentage").ToString()); - Console.WriteLine(result.GetProperty("darkPixelPercentage").ToString()); - Console.WriteLine(result.GetProperty("ndviMedianValue").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("sceneDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("fileLink").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("imageFiles")[0].GetProperty("resolution").ToString()); + Console.WriteLine(result[0].GetProperty("imageFormat").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCoverPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("darkPixelPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("ndviMedianValue").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); } } @@ -535,21 +562,20 @@ public async Task Example_GetScenes_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateSatelliteDataIngestionJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - source = "Sentinel_2_L2A", - }; - - var operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["source"] = "Sentinel_2_L2A", + }); + Operation operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -562,40 +588,42 @@ public void Example_CreateSatelliteDataIngestionJob() [Ignore("Only validating compilation of examples")] public void Example_CreateSatelliteDataIngestionJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - provider = "Microsoft", - source = "Sentinel_2_L2A", - data = new + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["provider"] = "Microsoft", + ["source"] = "Sentinel_2_L2A", + ["data"] = new Dictionary() { - imageNames = new[] { - "" - }, - imageFormats = new[] { - "" - }, - imageResolutions = new[] { - 123.45d - }, + ["imageNames"] = new List() +{ +"" +}, + ["imageFormats"] = new List() +{ +"" +}, + ["imageResolutions"] = new List() +{ +123.45 +}, }, - name = "", - description = "", - properties = new + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateSatelliteDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -619,28 +647,27 @@ public void Example_CreateSatelliteDataIngestionJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateSatelliteDataIngestionJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - source = "Sentinel_2_L2A", - }; - - var operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["source"] = "Sentinel_2_L2A", + }); + Operation operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -653,40 +680,42 @@ public async Task Example_CreateSatelliteDataIngestionJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateSatelliteDataIngestionJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetScenesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Scenes client = new FarmBeatsClient(credential).GetScenesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - boundaryId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - provider = "Microsoft", - source = "Sentinel_2_L2A", - data = new + ["partyId"] = "", + ["boundaryId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["provider"] = "Microsoft", + ["source"] = "Sentinel_2_L2A", + ["data"] = new Dictionary() { - imageNames = new[] { - "" - }, - imageFormats = new[] { - "" - }, - imageResolutions = new[] { - 123.45d - }, + ["imageNames"] = new List() +{ +"" +}, + ["imageFormats"] = new List() +{ +"" +}, + ["imageResolutions"] = new List() +{ +123.45 +}, }, - name = "", - description = "", - properties = new + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateSatelliteDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("boundaryId").ToString()); @@ -710,7 +739,7 @@ public async Task Example_CreateSatelliteDataIngestionJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SeasonalFields.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SeasonalFields.cs index 74cce23899af..07c4eec39873 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SeasonalFields.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SeasonalFields.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_SeasonalFields [Ignore("Only validating compilation of examples")] public void Example_GetSeasonalField() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSeasonalField("", "", new RequestContext()); + Response response = client.GetSeasonalField("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetSeasonalField() [Ignore("Only validating compilation of examples")] public void Example_GetSeasonalField_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSeasonalField("", "", new RequestContext()); + Response response = client.GetSeasonalField("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -58,17 +58,17 @@ public void Example_GetSeasonalField_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasonalField_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSeasonalFieldAsync("", "", new RequestContext()); + Response response = await client.GetSeasonalFieldAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -78,10 +78,10 @@ public async Task Example_GetSeasonalField_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasonalField_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSeasonalFieldAsync("", "", new RequestContext()); + Response response = await client.GetSeasonalFieldAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -100,19 +100,18 @@ public async Task Example_GetSeasonalField_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -122,29 +121,29 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - farmId = "", - fieldId = "", - seasonId = "", - cropProductIds = new[] { - "" - }, - cropId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["farmId"] = "", + ["fieldId"] = "", + ["seasonId"] = "", + ["cropProductIds"] = new List() +{ +"" +}, + ["cropId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -163,19 +162,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -185,29 +183,29 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - farmId = "", - fieldId = "", - seasonId = "", - cropProductIds = new[] { - "" - }, - cropId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["farmId"] = "", + ["fieldId"] = "", + ["seasonId"] = "", + ["cropProductIds"] = new List() +{ +"" +}, + ["cropId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -226,15 +224,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -244,8 +242,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -255,8 +253,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -266,8 +264,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -277,10 +275,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -292,10 +290,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -316,10 +314,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -331,10 +329,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -355,13 +353,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSeasonalFieldsByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSeasonalFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSeasonalFieldsByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -369,29 +367,56 @@ public void Example_GetSeasonalFieldsByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetSeasonalFieldsByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSeasonalFieldsByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSeasonalFieldsByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -399,13 +424,13 @@ public void Example_GetSeasonalFieldsByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasonalFieldsByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSeasonalFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSeasonalFieldsByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -413,29 +438,56 @@ public async Task Example_GetSeasonalFieldsByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasonalFieldsByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSeasonalFieldsByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSeasonalFieldsByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -443,13 +495,13 @@ public async Task Example_GetSeasonalFieldsByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSeasonalFields() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSeasonalFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSeasonalFields(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -457,29 +509,56 @@ public void Example_GetSeasonalFields() [Ignore("Only validating compilation of examples")] public void Example_GetSeasonalFields_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSeasonalFields(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSeasonalFields(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -487,13 +566,13 @@ public void Example_GetSeasonalFields_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasonalFields_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSeasonalFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSeasonalFieldsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -501,29 +580,56 @@ public async Task Example_GetSeasonalFields_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasonalFields_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSeasonalFieldsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSeasonalFieldsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("farmId").ToString()); - Console.WriteLine(result.GetProperty("fieldId").ToString()); - Console.WriteLine(result.GetProperty("seasonId").ToString()); - Console.WriteLine(result.GetProperty("cropProductIds")[0].ToString()); - Console.WriteLine(result.GetProperty("cropId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("farmId").ToString()); + Console.WriteLine(result[0].GetProperty("fieldId").ToString()); + Console.WriteLine(result[0].GetProperty("seasonId").ToString()); + Console.WriteLine(result[0].GetProperty("cropProductIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("cropId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -531,12 +637,12 @@ public async Task Example_GetSeasonalFields_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -547,12 +653,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -572,12 +678,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -588,12 +694,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonalFieldsClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + SeasonalFields client = new FarmBeatsClient(credential).GetSeasonalFieldsClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Seasons.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Seasons.cs index 6ee474ed4e7d..0d394b349414 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Seasons.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Seasons.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Seasons [Ignore("Only validating compilation of examples")] public void Example_GetSeason() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSeason("", new RequestContext()); + Response response = client.GetSeason("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetSeason() [Ignore("Only validating compilation of examples")] public void Example_GetSeason_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSeason("", new RequestContext()); + Response response = client.GetSeason("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -56,17 +56,17 @@ public void Example_GetSeason_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSeason_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSeasonAsync("", new RequestContext()); + Response response = await client.GetSeasonAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -76,10 +76,10 @@ public async Task Example_GetSeason_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeason_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSeasonAsync("", new RequestContext()); + Response response = await client.GetSeasonAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -96,19 +96,18 @@ public async Task Example_GetSeason_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -118,26 +117,25 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - year = 1234, - geographicIdentifier = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["year"] = 1234, + ["geographicIdentifier"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -154,19 +152,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -176,26 +173,25 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - year = 1234, - geographicIdentifier = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["year"] = 1234, + ["geographicIdentifier"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("startDateTime").ToString()); @@ -212,15 +208,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -230,8 +226,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -241,8 +237,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -252,8 +248,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -263,13 +259,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSeasons() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSeasons(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSeasons(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -277,27 +273,42 @@ public void Example_GetSeasons() [Ignore("Only validating compilation of examples")] public void Example_GetSeasons_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSeasons(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSeasons(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), new List() +{ +1234 +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("year").ToString()); - Console.WriteLine(result.GetProperty("geographicIdentifier").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("year").ToString()); + Console.WriteLine(result[0].GetProperty("geographicIdentifier").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -305,13 +316,13 @@ public void Example_GetSeasons_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasons_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSeasonsAsync(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSeasonsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -319,27 +330,42 @@ public async Task Example_GetSeasons_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSeasons_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSeasonsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Seasons client = new FarmBeatsClient(credential).GetSeasonsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSeasonsAsync(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, new int[] { 1234 }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSeasonsAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), new List() +{ +1234 +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("year").ToString()); - Console.WriteLine(result.GetProperty("geographicIdentifier").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("year").ToString()); + Console.WriteLine(result[0].GetProperty("geographicIdentifier").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorDataModels.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorDataModels.cs index 137a6e45269e..76f3b2ab8fc5 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorDataModels.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorDataModels.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,72 +23,70 @@ internal class Samples_SensorDataModels [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - measures = new + ["measures"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - dataType = "Bool", + ["dataType"] = "Bool", }, }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - manufacturer = "", - productCode = "", - measures = new + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["measures"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - description = "", - dataType = "Bool", - type = "", - unit = "", - properties = new + ["description"] = "", + ["dataType"] = "Bool", + ["type"] = "", + ["unit"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, }, }, - status = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -99,79 +97,77 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - measures = new + ["measures"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - dataType = "Bool", + ["dataType"] = "Bool", }, }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - manufacturer = "", - productCode = "", - measures = new + ["type"] = "", + ["manufacturer"] = "", + ["productCode"] = "", + ["measures"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - description = "", - dataType = "Bool", - type = "", - unit = "", - properties = new + ["description"] = "", + ["dataType"] = "Bool", + ["type"] = "", + ["unit"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, }, }, - status = "", - name = "", - description = "", - properties = new + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -182,40 +178,40 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetSensorDataModel() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorDataModel("", "", new RequestContext()); + Response response = client.GetSensorDataModel("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetSensorDataModel_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorDataModel("", "", new RequestContext()); + Response response = client.GetSensorDataModel("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -226,40 +222,40 @@ public void Example_GetSensorDataModel_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorDataModel_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorDataModelAsync("", "", new RequestContext()); + Response response = await client.GetSensorDataModelAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorDataModel_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorDataModelAsync("", "", new RequestContext()); + Response response = await client.GetSensorDataModelAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("manufacturer").ToString()); Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -270,15 +266,15 @@ public async Task Example_GetSensorDataModel_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -288,8 +284,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -299,8 +295,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -310,8 +306,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -321,13 +317,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSensorDataModels() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensorDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensorDataModels("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } } @@ -335,31 +331,43 @@ public void Example_GetSensorDataModels() [Ignore("Only validating compilation of examples")] public void Example_GetSensorDataModels_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensorDataModels("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensorDataModels("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -367,13 +375,13 @@ public void Example_GetSensorDataModels_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorDataModels_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorDataModelsAsync("", null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); } } @@ -381,31 +389,43 @@ public async Task Example_GetSensorDataModels_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorDataModels_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorDataModelsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorDataModels client = new FarmBeatsClient(credential).GetSensorDataModelsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorDataModelsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorDataModelsAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("manufacturer").ToString()); - Console.WriteLine(result.GetProperty("productCode").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("manufacturer").ToString()); + Console.WriteLine(result[0].GetProperty("productCode").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("dataType").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("measures").GetProperty("").GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorEvents.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorEvents.cs index a2f51888393c..f7f1550f1dd0 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorEvents.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorEvents.cs @@ -6,13 +6,12 @@ #nullable disable using System; -using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +22,10 @@ internal class Samples_SensorEvents [Ignore("Only validating compilation of examples")] public void Example_GetSensorEvents() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorEventsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorEvents client = new FarmBeatsClient(credential).GetSensorEventsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorEvents("", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, true, new RequestContext()); + Response response = client.GetSensorEvents("", "", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].ToString()); @@ -36,10 +35,10 @@ public void Example_GetSensorEvents() [Ignore("Only validating compilation of examples")] public void Example_GetSensorEvents_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorEventsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorEvents client = new FarmBeatsClient(credential).GetSensorEventsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorEvents("", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, true, new RequestContext()); + Response response = client.GetSensorEvents("", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("sensorId").ToString()); @@ -48,7 +47,7 @@ public void Example_GetSensorEvents_AllParameters() Console.WriteLine(result.GetProperty("value")[0].GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("eventDateTime").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("ingestionDateTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("skipToken").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } @@ -57,10 +56,10 @@ public void Example_GetSensorEvents_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorEvents_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorEventsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorEvents client = new FarmBeatsClient(credential).GetSensorEventsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorEventsAsync("", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, true, new RequestContext()); + Response response = await client.GetSensorEventsAsync("", "", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].ToString()); @@ -70,10 +69,10 @@ public async Task Example_GetSensorEvents_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorEvents_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorEventsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorEvents client = new FarmBeatsClient(credential).GetSensorEventsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorEventsAsync("", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, true, new RequestContext()); + Response response = await client.GetSensorEventsAsync("", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("sensorId").ToString()); @@ -82,7 +81,7 @@ public async Task Example_GetSensorEvents_AllParameters_Async() Console.WriteLine(result.GetProperty("value")[0].GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("eventDateTime").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("ingestionDateTime").ToString()); - Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("measures").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("skipToken").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorMappings.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorMappings.cs index b9db20de848d..232d3692ad78 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorMappings.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorMappings.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,12 +23,11 @@ internal class Samples_SensorMappings [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -38,25 +37,24 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - sensorId = "", - sensorPartnerId = "", - partyId = "", - boundaryId = "", - status = "", - name = "", - description = "", - properties = new + ["sensorId"] = "", + ["sensorPartnerId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -72,19 +70,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -94,25 +91,24 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - sensorId = "", - sensorPartnerId = "", - partyId = "", - boundaryId = "", - status = "", - name = "", - description = "", - properties = new + ["sensorId"] = "", + ["sensorPartnerId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -128,17 +124,17 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetSensorMapping() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorMapping("", new RequestContext()); + Response response = client.GetSensorMapping("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -148,10 +144,10 @@ public void Example_GetSensorMapping() [Ignore("Only validating compilation of examples")] public void Example_GetSensorMapping_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorMapping("", new RequestContext()); + Response response = client.GetSensorMapping("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -167,17 +163,17 @@ public void Example_GetSensorMapping_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorMapping_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorMappingAsync("", new RequestContext()); + Response response = await client.GetSensorMappingAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -187,10 +183,10 @@ public async Task Example_GetSensorMapping_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorMapping_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorMappingAsync("", new RequestContext()); + Response response = await client.GetSensorMappingAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorId").ToString()); @@ -206,15 +202,15 @@ public async Task Example_GetSensorMapping_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -224,8 +220,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete(""); Console.WriteLine(response.Status); @@ -235,8 +231,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -246,8 +242,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); @@ -257,13 +253,13 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSensorMappings() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensorMappings(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensorMappings(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -271,26 +267,50 @@ public void Example_GetSensorMappings() [Ignore("Only validating compilation of examples")] public void Example_GetSensorMappings_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensorMappings(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensorMappings(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -298,13 +318,13 @@ public void Example_GetSensorMappings_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorMappings_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorMappingsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorMappingsAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -312,26 +332,50 @@ public async Task Example_GetSensorMappings_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorMappings_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorMappingsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorMappings client = new FarmBeatsClient(credential).GetSensorMappingsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorMappingsAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorMappingsAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorPartnerIntegrations.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorPartnerIntegrations.cs index 6610ab58ff36..6a08c6d7d111 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorPartnerIntegrations.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SensorPartnerIntegrations.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,12 +23,11 @@ internal class Samples_SensorPartnerIntegrations [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -38,22 +37,21 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - status = "", - name = "", - description = "", - properties = new + ["partyId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -68,19 +66,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -90,22 +87,21 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - partyId = "", - status = "", - name = "", - description = "", - properties = new + ["partyId"] = "", + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -120,17 +116,17 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetSensorPartnerIntegration() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorPartnerIntegration("", "", new RequestContext()); + Response response = client.GetSensorPartnerIntegration("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -140,10 +136,10 @@ public void Example_GetSensorPartnerIntegration() [Ignore("Only validating compilation of examples")] public void Example_GetSensorPartnerIntegration_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensorPartnerIntegration("", "", new RequestContext()); + Response response = client.GetSensorPartnerIntegration("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -158,17 +154,17 @@ public void Example_GetSensorPartnerIntegration_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorPartnerIntegration_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorPartnerIntegrationAsync("", "", new RequestContext()); + Response response = await client.GetSensorPartnerIntegrationAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -178,10 +174,10 @@ public async Task Example_GetSensorPartnerIntegration_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorPartnerIntegration_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorPartnerIntegrationAsync("", "", new RequestContext()); + Response response = await client.GetSensorPartnerIntegrationAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("integrationId").ToString()); @@ -196,15 +192,15 @@ public async Task Example_GetSensorPartnerIntegration_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -214,8 +210,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -225,8 +221,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -236,8 +232,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -247,10 +243,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CheckConsent() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = client.CheckConsent("", "", "", new RequestContext()); + Response response = client.CheckConsent("", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -260,10 +256,10 @@ public void Example_CheckConsent() [Ignore("Only validating compilation of examples")] public void Example_CheckConsent_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = client.CheckConsent("", "", "", new RequestContext()); + Response response = client.CheckConsent("", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consented").ToString()); @@ -275,10 +271,10 @@ public void Example_CheckConsent_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CheckConsent_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CheckConsentAsync("", "", "", new RequestContext()); + Response response = await client.CheckConsentAsync("", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -288,10 +284,10 @@ public async Task Example_CheckConsent_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CheckConsent_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CheckConsentAsync("", "", "", new RequestContext()); + Response response = await client.CheckConsentAsync("", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consented").ToString()); @@ -303,10 +299,10 @@ public async Task Example_CheckConsent_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GenerateConsentLink() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GenerateConsentLink("", "", new RequestContext()); + Response response = client.GenerateConsentLink("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -316,10 +312,10 @@ public void Example_GenerateConsentLink() [Ignore("Only validating compilation of examples")] public void Example_GenerateConsentLink_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GenerateConsentLink("", "", new RequestContext()); + Response response = client.GenerateConsentLink("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consentLink").ToString()); @@ -330,10 +326,10 @@ public void Example_GenerateConsentLink_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GenerateConsentLink_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GenerateConsentLinkAsync("", "", new RequestContext()); + Response response = await client.GenerateConsentLinkAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -343,10 +339,10 @@ public async Task Example_GenerateConsentLink_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GenerateConsentLink_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GenerateConsentLinkAsync("", "", new RequestContext()); + Response response = await client.GenerateConsentLinkAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("consentLink").ToString()); @@ -357,13 +353,13 @@ public async Task Example_GenerateConsentLink_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSensorPartnerIntegrations() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensorPartnerIntegrations("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensorPartnerIntegrations("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -371,25 +367,43 @@ public void Example_GetSensorPartnerIntegrations() [Ignore("Only validating compilation of examples")] public void Example_GetSensorPartnerIntegrations_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensorPartnerIntegrations("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensorPartnerIntegrations("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -397,13 +411,13 @@ public void Example_GetSensorPartnerIntegrations_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorPartnerIntegrations_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorPartnerIntegrationsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorPartnerIntegrationsAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -411,25 +425,43 @@ public async Task Example_GetSensorPartnerIntegrations_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensorPartnerIntegrations_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SensorPartnerIntegrations client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorPartnerIntegrationsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorPartnerIntegrationsAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Sensors.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Sensors.cs index f4c8c66630b9..b2309de2315b 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Sensors.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Sensors.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,12 +23,11 @@ internal class Samples_Sensors [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -38,39 +37,39 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - sensorDataModelId = "", - integrationId = "", - hardwareId = "", - deviceId = "", - type = "", - location = new + ["sensorDataModelId"] = "", + ["integrationId"] = "", + ["hardwareId"] = "", + ["deviceId"] = "", + ["type"] = "", + ["location"] = new Dictionary() { - latitude = 123.45d, - longitude = 123.45d, + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - port = new + ["port"] = new Dictionary() { - name = "", - type = "", + ["name"] = "", + ["type"] = "", }, - depthInMeters = new[] { - 123.45d - }, - status = "", - name = "", - description = "", - properties = new + ["depthInMeters"] = new List() +{ +123.45 +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -93,19 +92,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -115,39 +113,39 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - sensorDataModelId = "", - integrationId = "", - hardwareId = "", - deviceId = "", - type = "", - location = new + ["sensorDataModelId"] = "", + ["integrationId"] = "", + ["hardwareId"] = "", + ["deviceId"] = "", + ["type"] = "", + ["location"] = new Dictionary() { - latitude = 123.45d, - longitude = 123.45d, + ["latitude"] = 123.45, + ["longitude"] = 123.45, }, - port = new + ["port"] = new Dictionary() { - name = "", - type = "", + ["name"] = "", + ["type"] = "", }, - depthInMeters = new[] { - 123.45d - }, - status = "", - name = "", - description = "", - properties = new + ["depthInMeters"] = new List() +{ +123.45 +}, + ["status"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -170,17 +168,17 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetSensor() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensor("", "", new RequestContext()); + Response response = client.GetSensor("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -190,10 +188,10 @@ public void Example_GetSensor() [Ignore("Only validating compilation of examples")] public void Example_GetSensor_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetSensor("", "", new RequestContext()); + Response response = client.GetSensor("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -216,17 +214,17 @@ public void Example_GetSensor_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetSensor_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorAsync("", "", new RequestContext()); + Response response = await client.GetSensorAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -236,10 +234,10 @@ public async Task Example_GetSensor_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensor_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetSensorAsync("", "", new RequestContext()); + Response response = await client.GetSensorAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); @@ -262,15 +260,15 @@ public async Task Example_GetSensor_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -280,8 +278,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -291,8 +289,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -302,8 +300,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -313,10 +311,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetConnectionString() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetConnectionString("", "", new RequestContext()); + Response response = client.GetConnectionString("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -326,10 +324,10 @@ public void Example_GetConnectionString() [Ignore("Only validating compilation of examples")] public void Example_GetConnectionString_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetConnectionString("", "", new RequestContext()); + Response response = client.GetConnectionString("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); @@ -340,10 +338,10 @@ public void Example_GetConnectionString_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetConnectionString_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetConnectionStringAsync("", "", new RequestContext()); + Response response = await client.GetConnectionStringAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -353,10 +351,10 @@ public async Task Example_GetConnectionString_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetConnectionString_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetConnectionStringAsync("", "", new RequestContext()); + Response response = await client.GetConnectionStringAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); @@ -367,15 +365,14 @@ public async Task Example_GetConnectionString_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_RenewConnectionString() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - connectionStringType = "Primary", - }; - - Response response = client.RenewConnectionString("", "", RequestContent.Create(data)); + ["connectionStringType"] = "Primary", + }); + Response response = client.RenewConnectionString("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -385,15 +382,14 @@ public void Example_RenewConnectionString() [Ignore("Only validating compilation of examples")] public void Example_RenewConnectionString_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - connectionStringType = "Primary", - }; - - Response response = client.RenewConnectionString("", "", RequestContent.Create(data)); + ["connectionStringType"] = "Primary", + }); + Response response = client.RenewConnectionString("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); @@ -404,15 +400,14 @@ public void Example_RenewConnectionString_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_RenewConnectionString_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - connectionStringType = "Primary", - }; - - Response response = await client.RenewConnectionStringAsync("", "", RequestContent.Create(data)); + ["connectionStringType"] = "Primary", + }); + Response response = await client.RenewConnectionStringAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -422,15 +417,14 @@ public async Task Example_RenewConnectionString_Async() [Ignore("Only validating compilation of examples")] public async Task Example_RenewConnectionString_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - connectionStringType = "Primary", - }; - - Response response = await client.RenewConnectionStringAsync("", "", RequestContent.Create(data)); + ["connectionStringType"] = "Primary", + }); + Response response = await client.RenewConnectionStringAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("primaryDeviceConnectionString").ToString()); @@ -441,13 +435,13 @@ public async Task Example_RenewConnectionString_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSensors() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensors("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensors("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -455,33 +449,54 @@ public void Example_GetSensors() [Ignore("Only validating compilation of examples")] public void Example_GetSensors_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetSensors("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSensors("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("depthInMeters")[0].ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("depthInMeters")[0].ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -489,13 +504,13 @@ public void Example_GetSensors_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensors_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorsAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -503,33 +518,54 @@ public async Task Example_GetSensors_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSensors_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSensorsClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Sensors client = new FarmBeatsClient(credential).GetSensorsClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetSensorsAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSensorsAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sensorDataModelId").ToString()); - Console.WriteLine(result.GetProperty("integrationId").ToString()); - Console.WriteLine(result.GetProperty("hardwareId").ToString()); - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("port").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("depthInMeters")[0].ToString()); - Console.WriteLine(result.GetProperty("sensorPartnerId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("sensorDataModelId").ToString()); + Console.WriteLine(result[0].GetProperty("integrationId").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("port").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("depthInMeters")[0].ToString()); + Console.WriteLine(result[0].GetProperty("sensorPartnerId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SolutionInference.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SolutionInference.cs index 56f1c0887b0f..40c15da943ea 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SolutionInference.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_SolutionInference.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,244 +23,232 @@ internal class Samples_SolutionInference [Ignore("Only validating compilation of examples")] public void Example_Cancel() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - }; - - Response response = client.Cancel("", RequestContent.Create(data)); + ["requestPath"] = "", + }); + Response response = client.Cancel("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Cancel_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - partnerRequestBody = new + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.Cancel("", RequestContent.Create(data)); + }); + Response response = client.Cancel("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_Cancel_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - }; - - Response response = await client.CancelAsync("", RequestContent.Create(data)); + ["requestPath"] = "", + }); + Response response = await client.CancelAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_Cancel_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - partnerRequestBody = new + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CancelAsync("", RequestContent.Create(data)); + }); + Response response = await client.CancelAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Fetch() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - }; - - Response response = client.Fetch("", RequestContent.Create(data)); + ["requestPath"] = "", + }); + Response response = client.Fetch("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Fetch_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - partnerRequestBody = new + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.Fetch("", RequestContent.Create(data)); + }); + Response response = client.Fetch("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_Fetch_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - }; - - Response response = await client.FetchAsync("", RequestContent.Create(data)); + ["requestPath"] = "", + }); + Response response = await client.FetchAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_Fetch_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - partnerRequestBody = new + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.FetchAsync("", RequestContent.Create(data)); + }); + Response response = await client.FetchAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - }; - - var operation = client.CreateOrUpdate(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["requestPath"] = "", + }); + Operation operation = client.CreateOrUpdate(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - partnerRequestBody = new + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateOrUpdate(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateOrUpdate(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - }; - - var operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["requestPath"] = "", + }); + Operation operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetSolutionInferenceClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + SolutionInference client = new FarmBeatsClient(credential).GetSolutionInferenceClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - requestPath = "", - partnerRequestBody = new + ["requestPath"] = "", + ["partnerRequestBody"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateOrUpdateAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_TillageData.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_TillageData.cs index 3a76cfba8581..5d62c012952d 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_TillageData.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_TillageData.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_TillageData [Ignore("Only validating compilation of examples")] public void Example_GetTillageData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetTillageData("", "", new RequestContext()); + Response response = client.GetTillageData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetTillageData() [Ignore("Only validating compilation of examples")] public void Example_GetTillageData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetTillageData("", "", new RequestContext()); + Response response = client.GetTillageData("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -64,17 +64,17 @@ public void Example_GetTillageData_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetTillageData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetTillageDataAsync("", "", new RequestContext()); + Response response = await client.GetTillageDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -84,10 +84,10 @@ public async Task Example_GetTillageData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTillageData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetTillageDataAsync("", "", new RequestContext()); + Response response = await client.GetTillageDataAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -112,19 +112,18 @@ public async Task Example_GetTillageData_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -134,41 +133,34 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - tillageDepth = new - { - unit = "", - value = 123.45d, - }, - tillagePressure = new + ["tillageDepth"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - area = new + ["tillagePressure"] = null + , + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - unit = "", - value = 123.45d, + ["key"] = new Dictionary(), }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new - { - key = new { }, - }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -193,19 +185,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -215,41 +206,34 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - tillageDepth = new - { - unit = "", - value = 123.45d, - }, - tillagePressure = new - { - unit = "", - value = 123.45d, - }, - area = new + ["tillageDepth"] = new Dictionary() { - unit = "", - value = 123.45d, + ["unit"] = "", + ["value"] = 123.45, }, - operationModifiedDateTime = "2022-05-10T18:57:31.2311892Z", - operationStartDateTime = "2022-05-10T18:57:31.2311892Z", - operationEndDateTime = "2022-05-10T18:57:31.2311892Z", - associatedBoundaryId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["tillagePressure"] = null + , + ["area"] = null + , + ["operationModifiedDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationStartDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["operationEndDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["associatedBoundaryId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); @@ -274,15 +258,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -292,8 +276,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -303,8 +287,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -314,8 +298,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -325,10 +309,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -340,10 +324,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -364,10 +348,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -379,10 +363,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -403,13 +387,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllTillageDataByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllTillageDataByPartyId("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllTillageDataByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -417,35 +401,53 @@ public void Example_GetAllTillageDataByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetAllTillageDataByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllTillageDataByPartyId("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllTillageDataByPartyId("", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -453,13 +455,13 @@ public void Example_GetAllTillageDataByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllTillageDataByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllTillageDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllTillageDataByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -467,35 +469,53 @@ public async Task Example_GetAllTillageDataByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllTillageDataByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllTillageDataByPartyIdAsync("", 3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllTillageDataByPartyIdAsync("", 123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -503,13 +523,13 @@ public async Task Example_GetAllTillageDataByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllTillageData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllTillageData(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllTillageData(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -517,35 +537,53 @@ public void Example_GetAllTillageData() [Ignore("Only validating compilation of examples")] public void Example_GetAllTillageData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetAllTillageData(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetAllTillageData(123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -553,13 +591,13 @@ public void Example_GetAllTillageData_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllTillageData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllTillageDataAsync(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllTillageDataAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -567,35 +605,53 @@ public async Task Example_GetAllTillageData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllTillageData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetAllTillageDataAsync(3.14, 3.14, 3.14, 3.14, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 3.14, 3.14, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetAllTillageDataAsync(123.45, 123.45, 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 123.45, 123.45, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillageDepth").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("tillagePressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("area").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("operationModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationStartDateTime").ToString()); - Console.WriteLine(result.GetProperty("operationEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("attachmentsLink").ToString()); - Console.WriteLine(result.GetProperty("associatedBoundaryId").ToString()); - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillageDepth").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("tillagePressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("area").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("operationModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationStartDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("attachmentsLink").ToString()); + Console.WriteLine(result[0].GetProperty("associatedBoundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -603,12 +659,12 @@ public async Task Example_GetAllTillageData_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -619,12 +675,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -644,12 +700,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -660,12 +716,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetTillageDataClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + TillageData client = new FarmBeatsClient(credential).GetTillageDataClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Weather.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Weather.cs index 91c100816202..ce26f7e1b6cb 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Weather.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Weather.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Weather [Ignore("Only validating compilation of examples")] public void Example_GetDataDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDataDeleteJobDetails("", new RequestContext()); + Response response = client.GetDataDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); @@ -38,10 +38,10 @@ public void Example_GetDataDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetDataDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDataDeleteJobDetails("", new RequestContext()); + Response response = client.GetDataDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); @@ -64,17 +64,17 @@ public void Example_GetDataDeleteJobDetails_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetDataDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDataDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetDataDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); @@ -86,10 +86,10 @@ public async Task Example_GetDataDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDataDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDataDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetDataDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); @@ -112,41 +112,41 @@ public async Task Example_GetDataDeleteJobDetails_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetDataIngestionJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDataIngestionJobDetails("", new RequestContext()); + Response response = client.GetDataIngestionJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetDataIngestionJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetDataIngestionJobDetails("", new RequestContext()); + Response response = client.GetDataIngestionJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -162,41 +162,41 @@ public void Example_GetDataIngestionJobDetails_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetDataIngestionJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDataIngestionJobDetailsAsync("", new RequestContext()); + Response response = await client.GetDataIngestionJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetDataIngestionJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetDataIngestionJobDetailsAsync("", new RequestContext()); + Response response = await client.GetDataIngestionJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -212,28 +212,28 @@ public async Task Example_GetDataIngestionJobDetails_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetWeathers() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetWeathers("", "", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetWeathers("", "", "", "", "", null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("extensionId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("dateTime").ToString()); - Console.WriteLine(result.GetProperty("extensionVersion").ToString()); - Console.WriteLine(result.GetProperty("weatherDataType").ToString()); - Console.WriteLine(result.GetProperty("granularity").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); } } @@ -241,57 +241,57 @@ public void Example_GetWeathers() [Ignore("Only validating compilation of examples")] public void Example_GetWeathers_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetWeathers("", "", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetWeathers("", "", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("extensionId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("dateTime").ToString()); - Console.WriteLine(result.GetProperty("unitSystemCode").ToString()); - Console.WriteLine(result.GetProperty("extensionVersion").ToString()); - Console.WriteLine(result.GetProperty("weatherDataType").ToString()); - Console.WriteLine(result.GetProperty("granularity").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("unitSystemCode").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -299,21 +299,21 @@ public void Example_GetWeathers_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetWeathers_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetWeathersAsync("", "", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetWeathersAsync("", "", "", "", "", null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("extensionId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("dateTime").ToString()); - Console.WriteLine(result.GetProperty("extensionVersion").ToString()); - Console.WriteLine(result.GetProperty("weatherDataType").ToString()); - Console.WriteLine(result.GetProperty("granularity").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); } } @@ -321,57 +321,57 @@ public async Task Example_GetWeathers_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetWeathers_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetWeathersAsync("", "", "", "", "", DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetWeathersAsync("", "", "", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("boundaryId").ToString()); - Console.WriteLine(result.GetProperty("extensionId").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("latitude").ToString()); - Console.WriteLine(result.GetProperty("location").GetProperty("longitude").ToString()); - Console.WriteLine(result.GetProperty("dateTime").ToString()); - Console.WriteLine(result.GetProperty("unitSystemCode").ToString()); - Console.WriteLine(result.GetProperty("extensionVersion").ToString()); - Console.WriteLine(result.GetProperty("weatherDataType").ToString()); - Console.WriteLine(result.GetProperty("granularity").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("cloudCover").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("dewPoint").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("growingDegreeDay").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("precipitation").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("pressure").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("relativeHumidity").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilMoisture").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("soilTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("temperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("visibility").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("wetBulbTemperature").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windChill").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windDirection").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windGust").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("windSpeed").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("boundaryId").ToString()); + Console.WriteLine(result[0].GetProperty("extensionId").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("latitude").ToString()); + Console.WriteLine(result[0].GetProperty("location").GetProperty("longitude").ToString()); + Console.WriteLine(result[0].GetProperty("dateTime").ToString()); + Console.WriteLine(result[0].GetProperty("unitSystemCode").ToString()); + Console.WriteLine(result[0].GetProperty("extensionVersion").ToString()); + Console.WriteLine(result[0].GetProperty("weatherDataType").ToString()); + Console.WriteLine(result[0].GetProperty("granularity").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("cloudCover").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("dewPoint").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("growingDegreeDay").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("precipitation").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("pressure").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("relativeHumidity").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilMoisture").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("soilTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("temperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("visibility").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("wetBulbTemperature").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windChill").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windDirection").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windGust").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("unit").ToString()); + Console.WriteLine(result[0].GetProperty("windSpeed").GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -379,19 +379,18 @@ public async Task Example_GetWeathers_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateDataDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - extensionId = "", - partyId = "", - boundaryId = "", - }; - - var operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + }); + Operation operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -402,29 +401,28 @@ public void Example_CreateDataDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateDataDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - extensionId = "", - partyId = "", - boundaryId = "", - weatherDataType = "", - granularity = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - name = "", - description = "", - properties = new + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["weatherDataType"] = "", + ["granularity"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateDataDeleteJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -446,26 +444,25 @@ public void Example_CreateDataDeleteJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateDataDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - extensionId = "", - partyId = "", - boundaryId = "", - }; - - var operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + }); + Operation operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -476,29 +473,28 @@ public async Task Example_CreateDataDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateDataDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - extensionId = "", - partyId = "", - boundaryId = "", - weatherDataType = "", - granularity = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - endDateTime = "2022-05-10T18:57:31.2311892Z", - name = "", - description = "", - properties = new + ["extensionId"] = "", + ["partyId"] = "", + ["boundaryId"] = "", + ["weatherDataType"] = "", + ["granularity"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["endDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateDataDeleteJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -520,75 +516,73 @@ public async Task Example_CreateDataDeleteJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateDataIngestionJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - boundaryId = "", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateDataIngestionJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - boundaryId = "", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - extensionDataProviderAppId = "", - extensionDataProviderApiKey = "", - name = "", - description = "", - properties = new + ["extensionDataProviderAppId"] = "", + ["extensionDataProviderApiKey"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateDataIngestionJob(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -604,75 +598,73 @@ public void Example_CreateDataIngestionJob_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateDataIngestionJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - boundaryId = "", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateDataIngestionJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Weather client = new FarmBeatsClient(credential).GetWeatherClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - boundaryId = "", - partyId = "", - extensionId = "", - extensionApiName = "", - extensionApiInput = new + ["boundaryId"] = "", + ["partyId"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["extensionApiInput"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - extensionDataProviderAppId = "", - extensionDataProviderApiKey = "", - name = "", - description = "", - properties = new + ["extensionDataProviderAppId"] = "", + ["extensionDataProviderApiKey"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - var operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateDataIngestionJobAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("boundaryId").ToString()); Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("extensionId").ToString()); Console.WriteLine(result.GetProperty("extensionApiName").ToString()); - Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("extensionApiInput").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderAppId").ToString()); Console.WriteLine(result.GetProperty("extensionDataProviderApiKey").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); @@ -688,7 +680,7 @@ public async Task Example_CreateDataIngestionJob_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } } } diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_WeatherData.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_WeatherData.cs index 84ea035029bf..dfec38d43b82 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_WeatherData.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_WeatherData.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,18 +23,17 @@ internal class Samples_WeatherData [Ignore("Only validating compilation of examples")] public void Example_GetWeatherData() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - providerApiKey = "", - extensionId = "", - extensionApiName = "", - units = "", - }; - - Response response = client.GetWeatherData(RequestContent.Create(data)); + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["units"] = "", + }); + Response response = client.GetWeatherData(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -48,34 +47,35 @@ public void Example_GetWeatherData() [Ignore("Only validating compilation of examples")] public void Example_GetWeatherData_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - locations = new[] { - new { - type = "LatLong", - value = "", - } - }, - providerAppId = "", - providerApiKey = "", - extensionId = "", - extensionApiName = "", - language = "", - startTimeHours = 1234, - endTimeHours = 1234, - duration = 1234, - units = "", - additionalParams = new + ["locations"] = new List() +{ +new Dictionary() +{ +["type"] = "LatLong", +["value"] = "", +} +}, + ["providerAppId"] = "", + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["language"] = "", + ["startTimeHours"] = 1234, + ["endTimeHours"] = 1234, + ["duration"] = 1234, + ["units"] = "", + ["additionalParams"] = new Dictionary() { - iconResolution = "", - details = true, + ["iconResolution"] = "", + ["details"] = true, }, - }; - - Response response = client.GetWeatherData(RequestContent.Create(data)); + }); + Response response = client.GetWeatherData(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -132,7 +132,7 @@ public void Example_GetWeatherData_AllParameters() Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("windSpeed").GetProperty("values")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseLong")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseShort")[0].ToString()); - Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("code").ToString()); @@ -144,18 +144,17 @@ public void Example_GetWeatherData_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetWeatherData_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - providerApiKey = "", - extensionId = "", - extensionApiName = "", - units = "", - }; - - Response response = await client.GetWeatherDataAsync(RequestContent.Create(data)); + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["units"] = "", + }); + Response response = await client.GetWeatherDataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -169,34 +168,35 @@ public async Task Example_GetWeatherData_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetWeatherData_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetWeatherDataClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + WeatherData client = new FarmBeatsClient(credential).GetWeatherDataClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - locations = new[] { - new { - type = "LatLong", - value = "", - } - }, - providerAppId = "", - providerApiKey = "", - extensionId = "", - extensionApiName = "", - language = "", - startTimeHours = 1234, - endTimeHours = 1234, - duration = 1234, - units = "", - additionalParams = new + ["locations"] = new List() +{ +new Dictionary() +{ +["type"] = "LatLong", +["value"] = "", +} +}, + ["providerAppId"] = "", + ["providerApiKey"] = "", + ["extensionId"] = "", + ["extensionApiName"] = "", + ["language"] = "", + ["startTimeHours"] = 1234, + ["endTimeHours"] = 1234, + ["duration"] = 1234, + ["units"] = "", + ["additionalParams"] = new Dictionary() { - iconResolution = "", - details = true, + ["iconResolution"] = "", + ["details"] = true, }, - }; - - Response response = await client.GetWeatherDataAsync(RequestContent.Create(data)); + }); + Response response = await client.GetWeatherDataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("weatherMetadata").GetProperty("extensionVersion").ToString()); @@ -253,7 +253,7 @@ public async Task Example_GetWeatherData_AllParameters_Async() Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("windSpeed").GetProperty("values")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseLong")[0].ToString()); Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("wxPhraseShort")[0].ToString()); - Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("locations")[0].GetProperty("data").GetProperty("additionalAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("location").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("errors").GetProperty("locations")[0].GetProperty("code").ToString()); diff --git a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Zones.cs b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Zones.cs index 382dfc70a667..093e4098987b 100644 --- a/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Zones.cs +++ b/sdk/agrifood/Azure.Verticals.AgriFood.Farming/tests/Generated/Samples/Samples_Zones.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Verticals.AgriFood.Farming; using NUnit.Framework; namespace Azure.Verticals.AgriFood.Farming.Samples @@ -23,10 +23,10 @@ internal class Samples_Zones [Ignore("Only validating compilation of examples")] public void Example_GetZone() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetZone("", "", new RequestContext()); + Response response = client.GetZone("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -36,10 +36,10 @@ public void Example_GetZone() [Ignore("Only validating compilation of examples")] public void Example_GetZone_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetZone("", "", new RequestContext()); + Response response = client.GetZone("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -55,17 +55,17 @@ public void Example_GetZone_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetZone_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetZoneAsync("", "", new RequestContext()); + Response response = await client.GetZoneAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -75,10 +75,10 @@ public async Task Example_GetZone_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetZone_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetZoneAsync("", "", new RequestContext()); + Response response = await client.GetZoneAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -94,19 +94,18 @@ public async Task Example_GetZone_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - var data = new { }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -116,24 +115,23 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - managementZoneId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["managementZoneId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdate("", "", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -149,19 +147,18 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); - - var data = new { }; + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -171,24 +168,23 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - type = "", - managementZoneId = "", - status = "", - source = "", - name = "", - description = "", - properties = new + ["type"] = "", + ["managementZoneId"] = "", + ["status"] = "", + ["source"] = "", + ["name"] = "", + ["description"] = "", + ["properties"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -204,15 +200,15 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Delete() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -222,8 +218,8 @@ public void Example_Delete() [Ignore("Only validating compilation of examples")] public void Example_Delete_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = client.Delete("", ""); Console.WriteLine(response.Status); @@ -233,8 +229,8 @@ public void Example_Delete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -244,8 +240,8 @@ public async Task Example_Delete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Delete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); Response response = await client.DeleteAsync("", ""); Console.WriteLine(response.Status); @@ -255,10 +251,10 @@ public async Task Example_Delete_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -270,10 +266,10 @@ public void Example_GetCascadeDeleteJobDetails() [Ignore("Only validating compilation of examples")] public void Example_GetCascadeDeleteJobDetails_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = client.GetCascadeDeleteJobDetails("", new RequestContext()); + Response response = client.GetCascadeDeleteJobDetails("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -294,10 +290,10 @@ public void Example_GetCascadeDeleteJobDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -309,10 +305,10 @@ public async Task Example_GetCascadeDeleteJobDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - Response response = await client.GetCascadeDeleteJobDetailsAsync("", new RequestContext()); + Response response = await client.GetCascadeDeleteJobDetailsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); @@ -333,13 +329,13 @@ public async Task Example_GetCascadeDeleteJobDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetZonesByPartyId() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetZonesByPartyId("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -347,26 +343,47 @@ public void Example_GetZonesByPartyId() [Ignore("Only validating compilation of examples")] public void Example_GetZonesByPartyId_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetZonesByPartyId("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetZonesByPartyId("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -374,13 +391,13 @@ public void Example_GetZonesByPartyId_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetZonesByPartyId_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetZonesByPartyIdAsync("", null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -388,26 +405,47 @@ public async Task Example_GetZonesByPartyId_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetZonesByPartyId_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetZonesByPartyIdAsync("", new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetZonesByPartyIdAsync("", new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -415,13 +453,13 @@ public async Task Example_GetZonesByPartyId_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetZones() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetZones(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -429,26 +467,47 @@ public void Example_GetZones() [Ignore("Only validating compilation of examples")] public void Example_GetZones_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - foreach (var item in client.GetZones(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetZones(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -456,13 +515,13 @@ public void Example_GetZones_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetZones_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetZonesAsync(null, null, null, null, null, null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -470,26 +529,47 @@ public async Task Example_GetZones_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetZones_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); - await foreach (var item in client.GetZonesAsync(new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, new string[] { "" }, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetZonesAsync(new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, new List() +{ +"" +}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("partyId").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("managementZoneId").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("eTag").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("modifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("partyId").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("managementZoneId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("eTag").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("properties").GetProperty("").ToString()); } } @@ -497,12 +577,12 @@ public async Task Example_GetZones_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -513,12 +593,12 @@ public void Example_CreateCascadeDeleteJob() [Ignore("Only validating compilation of examples")] public void Example_CreateCascadeDeleteJob_AllParameters() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); - - var operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = client.CreateCascadeDeleteJob(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -538,12 +618,12 @@ public void Example_CreateCascadeDeleteJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); @@ -554,12 +634,12 @@ public async Task Example_CreateCascadeDeleteJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateCascadeDeleteJob_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var client = new FarmBeatsClient(credential).GetZonesClient("2022-11-01-preview"); - - var operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", new RequestContext()); + TokenCredential credential = new DefaultAzureCredential(); + Zones client = new FarmBeatsClient(credential).GetZonesClient(apiVersion: "2022-11-01-preview"); + Operation operation = await client.CreateCascadeDeleteJobAsync(WaitUntil.Completed, "", "", "", null); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("partyId").ToString()); Console.WriteLine(result.GetProperty("resourceId").ToString()); diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml index 45719edd02b9..89fa85eb6721 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Docs/AnomalyDetectorClient.xml @@ -2,22 +2,24 @@ - -This sample shows how to call DetectUnivariateEntireSeriesAsync with required request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - value = 123.45f, - } - }, -}; + +This sample shows how to call DetectUnivariateEntireSeriesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectUnivariateEntireSeriesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, +}); +Response response = await client.DetectUnivariateEntireSeriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -28,29 +30,31 @@ Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); ]]> -This sample shows how to call DetectUnivariateEntireSeriesAsync with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, -}; +This sample shows how to call DetectUnivariateEntireSeriesAsync with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectUnivariateEntireSeriesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, +}); +Response response = await client.DetectUnivariateEntireSeriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -61,26 +65,27 @@ Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("severity")[0].ToString()); -]]> - +]]> - -This sample shows how to call DetectUnivariateEntireSeries with required request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - value = 123.45f, - } - }, -}; + +This sample shows how to call DetectUnivariateEntireSeries and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectUnivariateEntireSeries(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, +}); +Response response = client.DetectUnivariateEntireSeries(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -91,29 +96,31 @@ Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); ]]> -This sample shows how to call DetectUnivariateEntireSeries with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, -}; +This sample shows how to call DetectUnivariateEntireSeries with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectUnivariateEntireSeries(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, +}); +Response response = client.DetectUnivariateEntireSeries(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -124,82 +131,105 @@ Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("severity")[0].ToString()); -]]> - +]]> - -This sample shows how to call DetectUnivariateLastPointAsync with required parameters. + +This sample shows how to call DetectUnivariateLastPointAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new UnivariateDetectionOptions(new TimeSeriesPoint[] +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() { - new TimeSeriesPoint(3.14f) +new TimeSeriesPoint(123.45F) +}); +Response response = await client.DetectUnivariateLastPointAsync(options); +]]> +This sample shows how to call DetectUnivariateLastPointAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() { - Timestamp = DateTimeOffset.UtcNow, - } +new TimeSeriesPoint(123.45F) +{ +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} }) { Granularity = TimeGranularity.Yearly, CustomInterval = 1234, Period = 1234, - MaxAnomalyRatio = 3.14f, + MaxAnomalyRatio = 123.45F, Sensitivity = 1234, ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 3.14f, + ImputeFixedValue = 123.45F, }; -var result = await client.DetectUnivariateLastPointAsync(options); -]]> - +Response response = await client.DetectUnivariateLastPointAsync(options); +]]> - -This sample shows how to call DetectUnivariateLastPoint with required parameters. + +This sample shows how to call DetectUnivariateLastPoint. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +}); +Response response = client.DetectUnivariateLastPoint(options); +]]> +This sample shows how to call DetectUnivariateLastPoint with all parameters. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new UnivariateDetectionOptions(new TimeSeriesPoint[] +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() { - new TimeSeriesPoint(3.14f) +new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.UtcNow, - } +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} }) { Granularity = TimeGranularity.Yearly, CustomInterval = 1234, Period = 1234, - MaxAnomalyRatio = 3.14f, + MaxAnomalyRatio = 123.45F, Sensitivity = 1234, ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 3.14f, + ImputeFixedValue = 123.45F, }; -var result = client.DetectUnivariateLastPoint(options); -]]> - +Response response = client.DetectUnivariateLastPoint(options); +]]> - -This sample shows how to call DetectUnivariateLastPointAsync with required request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - value = 123.45f, - } - }, -}; + +This sample shows how to call DetectUnivariateLastPointAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectUnivariateLastPointAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, +}); +Response response = await client.DetectUnivariateLastPointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -211,29 +241,31 @@ Console.WriteLine(result.GetProperty("isAnomaly").ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); ]]> -This sample shows how to call DetectUnivariateLastPointAsync with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, -}; +This sample shows how to call DetectUnivariateLastPointAsync with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectUnivariateLastPointAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, +}); +Response response = await client.DetectUnivariateLastPointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -245,26 +277,27 @@ Console.WriteLine(result.GetProperty("isAnomaly").ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); Console.WriteLine(result.GetProperty("severity").ToString()); -]]> - +]]> - -This sample shows how to call DetectUnivariateLastPoint with required request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - value = 123.45f, - } - }, -}; + +This sample shows how to call DetectUnivariateLastPoint and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectUnivariateLastPoint(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, +}); +Response response = client.DetectUnivariateLastPoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -276,29 +309,31 @@ Console.WriteLine(result.GetProperty("isAnomaly").ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); ]]> -This sample shows how to call DetectUnivariateLastPoint with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, -}; +This sample shows how to call DetectUnivariateLastPoint with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectUnivariateLastPoint(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, +}); +Response response = client.DetectUnivariateLastPoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -310,194 +345,251 @@ Console.WriteLine(result.GetProperty("isAnomaly").ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); Console.WriteLine(result.GetProperty("severity").ToString()); -]]> - +]]> - -This sample shows how to call DetectUnivariateChangePointAsync with required parameters. + +This sample shows how to call DetectUnivariateChangePointAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +}, TimeGranularity.Yearly); +Response response = await client.DetectUnivariateChangePointAsync(options); +]]> +This sample shows how to call DetectUnivariateChangePointAsync with all parameters. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() { - new TimeSeriesPoint(3.14f) +new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.UtcNow, - } +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} }, TimeGranularity.Yearly) { CustomInterval = 1234, Period = 1234, StableTrendWindow = 1234, - Threshold = 3.14f, + Threshold = 123.45F, }; -var result = await client.DetectUnivariateChangePointAsync(options); -]]> - +Response response = await client.DetectUnivariateChangePointAsync(options); +]]> - -This sample shows how to call DetectUnivariateChangePoint with required parameters. + +This sample shows how to call DetectUnivariateChangePoint. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +}, TimeGranularity.Yearly); +Response response = client.DetectUnivariateChangePoint(options); +]]> +This sample shows how to call DetectUnivariateChangePoint with all parameters. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() { - new TimeSeriesPoint(3.14f) +new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.UtcNow, - } +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} }, TimeGranularity.Yearly) { CustomInterval = 1234, Period = 1234, StableTrendWindow = 1234, - Threshold = 3.14f, + Threshold = 123.45F, }; -var result = client.DetectUnivariateChangePoint(options); -]]> - +Response response = client.DetectUnivariateChangePoint(options); +]]> - -This sample shows how to call DetectUnivariateChangePointAsync with required request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - value = 123.45f, - } - }, - granularity = "yearly", -}; + +This sample shows how to call DetectUnivariateChangePointAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", +}); +Response response = await client.DetectUnivariateChangePointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call DetectUnivariateChangePointAsync with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45f, -}; +This sample shows how to call DetectUnivariateChangePointAsync with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["stableTrendWindow"] = 1234, + ["threshold"] = 123.45F, +}); +Response response = await client.DetectUnivariateChangePointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); Console.WriteLine(result.GetProperty("isChangePoint")[0].ToString()); Console.WriteLine(result.GetProperty("confidenceScores")[0].ToString()); -]]> - +]]> - -This sample shows how to call DetectUnivariateChangePoint with required request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - value = 123.45f, - } - }, - granularity = "yearly", -}; + +This sample shows how to call DetectUnivariateChangePoint and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectUnivariateChangePoint(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", +}); +Response response = client.DetectUnivariateChangePoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call DetectUnivariateChangePoint with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45f, -}; +This sample shows how to call DetectUnivariateChangePoint with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectUnivariateChangePoint(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["stableTrendWindow"] = 1234, + ["threshold"] = 123.45F, +}); +Response response = client.DetectUnivariateChangePoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); Console.WriteLine(result.GetProperty("isChangePoint")[0].ToString()); Console.WriteLine(result.GetProperty("confidenceScores")[0].ToString()); -]]> - +]]> - -This sample shows how to call GetMultivariateBatchDetectionResultAsync with required parameters. + +This sample shows how to call GetMultivariateBatchDetectionResultAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var result = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid()); +Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); ]]> - +This sample shows how to call GetMultivariateBatchDetectionResultAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> - -This sample shows how to call GetMultivariateBatchDetectionResult with required parameters. + +This sample shows how to call GetMultivariateBatchDetectionResult. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var result = client.GetMultivariateBatchDetectionResult(Guid.NewGuid()); +Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); ]]> - +This sample shows how to call GetMultivariateBatchDetectionResult with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> - -This sample shows how to call GetMultivariateBatchDetectionResultAsync with required parameters and parse the result. + +This sample shows how to call GetMultivariateBatchDetectionResultAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid(), new RequestContext()); +Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("resultId").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); +]]> +This sample shows how to call GetMultivariateBatchDetectionResultAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -522,18 +614,33 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); -]]> - +]]> - -This sample shows how to call GetMultivariateBatchDetectionResult with required parameters and parse the result. + +This sample shows how to call GetMultivariateBatchDetectionResult and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.GetMultivariateBatchDetectionResult(Guid.NewGuid(), new RequestContext()); +Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("resultId").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); +]]> +This sample shows how to call GetMultivariateBatchDetectionResult with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -558,99 +665,115 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); -]]> - +]]> - -This sample shows how to call TrainMultivariateModelAsync with required parameters. + +This sample shows how to call TrainMultivariateModelAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.UtcNow, DateTimeOffset.UtcNow) +ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Response response = await client.TrainMultivariateModelAsync(modelInfo); +]]> +This sample shows how to call TrainMultivariateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { DataSchema = DataSchema.OneTable, - DisplayName = "", + DisplayName = "", SlidingWindow = 1234, AlignPolicy = new AlignPolicy() -{ + { AlignMode = AlignMode.Inner, FillNAMethod = FillNAMethod.Previous, - PaddingValue = 3.14f, + PaddingValue = 123.45F, }, }; -var result = await client.TrainMultivariateModelAsync(modelInfo); -]]> - +Response response = await client.TrainMultivariateModelAsync(modelInfo); +]]> - -This sample shows how to call TrainMultivariateModel with required parameters. + +This sample shows how to call TrainMultivariateModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Response response = client.TrainMultivariateModel(modelInfo); +]]> +This sample shows how to call TrainMultivariateModel with all parameters. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.UtcNow, DateTimeOffset.UtcNow) +ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { DataSchema = DataSchema.OneTable, - DisplayName = "", + DisplayName = "", SlidingWindow = 1234, AlignPolicy = new AlignPolicy() -{ + { AlignMode = AlignMode.Inner, FillNAMethod = FillNAMethod.Previous, - PaddingValue = 3.14f, + PaddingValue = 123.45F, }, }; -var result = client.TrainMultivariateModel(modelInfo); -]]> - +Response response = client.TrainMultivariateModel(modelInfo); +]]> - -This sample shows how to call TrainMultivariateModelAsync with required request content, and how to parse the result. + +This sample shows how to call TrainMultivariateModelAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.TrainMultivariateModelAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", +}); +Response response = await client.TrainMultivariateModelAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); ]]> -This sample shows how to call TrainMultivariateModelAsync with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - dataSource = "http://localhost:3000", - dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - displayName = "", - slidingWindow = 1234, - alignPolicy = new { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45f, - }, -}; +This sample shows how to call TrainMultivariateModelAsync with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.TrainMultivariateModelAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["dataSchema"] = "OneTable", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["displayName"] = "", + ["slidingWindow"] = 1234, + ["alignPolicy"] = new Dictionary() + { + ["alignMode"] = "Inner", + ["fillNAMethod"] = "Previous", + ["paddingValue"] = 123.45F, + }, +}); +Response response = await client.TrainMultivariateModelAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -677,51 +800,51 @@ Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo") Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); -]]> - +]]> - -This sample shows how to call TrainMultivariateModel with required request content, and how to parse the result. + +This sample shows how to call TrainMultivariateModel and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.TrainMultivariateModel(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", +}); +Response response = client.TrainMultivariateModel(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); ]]> -This sample shows how to call TrainMultivariateModel with all request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - dataSource = "http://localhost:3000", - dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - displayName = "", - slidingWindow = 1234, - alignPolicy = new { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45f, - }, -}; +This sample shows how to call TrainMultivariateModel with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.TrainMultivariateModel(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["dataSchema"] = "OneTable", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["displayName"] = "", + ["slidingWindow"] = 1234, + ["alignPolicy"] = new Dictionary() + { + ["alignMode"] = "Inner", + ["fillNAMethod"] = "Previous", + ["paddingValue"] = 123.45F, + }, +}); +Response response = client.TrainMultivariateModel(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -748,68 +871,110 @@ Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo") Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); -]]> - +]]> - -This sample shows how to call DeleteMultivariateModelAsync with required parameters. + +This sample shows how to call DeleteMultivariateModelAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = await client.DeleteMultivariateModelAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteMultivariateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = await client.DeleteMultivariateModelAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteMultivariateModel with required parameters. + +This sample shows how to call DeleteMultivariateModel. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = client.DeleteMultivariateModel(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteMultivariateModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.DeleteMultivariateModel(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetMultivariateModelAsync with required parameters. + +This sample shows how to call GetMultivariateModelAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var result = await client.GetMultivariateModelAsync(""); +Response response = await client.GetMultivariateModelAsync(""); ]]> - +This sample shows how to call GetMultivariateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = await client.GetMultivariateModelAsync(""); +]]> - -This sample shows how to call GetMultivariateModel with required parameters. + +This sample shows how to call GetMultivariateModel. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var result = client.GetMultivariateModel(""); +Response response = client.GetMultivariateModel(""); ]]> - +This sample shows how to call GetMultivariateModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.GetMultivariateModel(""); +]]> - -This sample shows how to call GetMultivariateModelAsync with required parameters and parse the result. + +This sample shows how to call GetMultivariateModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = await client.GetMultivariateModelAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); +]]> +This sample shows how to call GetMultivariateModelAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.GetMultivariateModelAsync("", new RequestContext()); +Response response = await client.GetMultivariateModelAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -836,18 +1001,30 @@ Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo") Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); -]]> - +]]> - -This sample shows how to call GetMultivariateModel with required parameters and parse the result. + +This sample shows how to call GetMultivariateModel and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.GetMultivariateModel("", new RequestContext()); +Response response = client.GetMultivariateModel("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("createdTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); +]]> +This sample shows how to call GetMultivariateModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +Response response = client.GetMultivariateModel("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -874,56 +1051,71 @@ Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo") Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); -]]> - +]]> - -This sample shows how to call DetectMultivariateBatchAnomalyAsync with required parameters. + +This sample shows how to call DetectMultivariateBatchAnomalyAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.UtcNow, DateTimeOffset.UtcNow) +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); +]]> +This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { TopContributorCount = 1234, }; -var result = await client.DetectMultivariateBatchAnomalyAsync("", options); -]]> - +Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); +]]> - -This sample shows how to call DetectMultivariateBatchAnomaly with required parameters. + +This sample shows how to call DetectMultivariateBatchAnomaly. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.UtcNow, DateTimeOffset.UtcNow) +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +Response response = client.DetectMultivariateBatchAnomaly("", options); +]]> +This sample shows how to call DetectMultivariateBatchAnomaly with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { TopContributorCount = 1234, }; -var result = client.DetectMultivariateBatchAnomaly("", options); -]]> - +Response response = client.DetectMultivariateBatchAnomaly("", options); +]]> - -This sample shows how to call DetectMultivariateBatchAnomalyAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call DetectMultivariateBatchAnomalyAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var data = new { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", -}; - -Response response = await client.DetectMultivariateBatchAnomalyAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", +}); +Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -933,20 +1125,20 @@ Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProp Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); ]]> -This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters and request content, and how to parse the result. +This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectMultivariateBatchAnomalyAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["topContributorCount"] = 1234, + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", +}); +Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -971,24 +1163,23 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); -]]> - +]]> - -This sample shows how to call DetectMultivariateBatchAnomaly with required parameters and request content, and how to parse the result. + +This sample shows how to call DetectMultivariateBatchAnomaly and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var data = new { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", -}; - -Response response = client.DetectMultivariateBatchAnomaly("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", +}); +Response response = client.DetectMultivariateBatchAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -998,20 +1189,20 @@ Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProp Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); ]]> -This sample shows how to call DetectMultivariateBatchAnomaly with all parameters and request content, and how to parse the result. +This sample shows how to call DetectMultivariateBatchAnomaly with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var data = new { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", -}; - -Response response = client.DetectMultivariateBatchAnomaly("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["dataSource"] = "http://localhost:3000", + ["topContributorCount"] = 1234, + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", +}); +Response response = client.DetectMultivariateBatchAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -1036,108 +1227,149 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); -]]> - +]]> - -This sample shows how to call DetectMultivariateLastAnomalyAsync with required parameters. + +This sample shows how to call DetectMultivariateLastAnomalyAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new MultivariateLastDetectionOptions(new VariableValues[] +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() { - new VariableValues("", new string[] +new VariableValues("",new List() { - "" - }, new float[] +"" +},new List() { - 3.14f - }) +123.45F +}) +}); +Response response = await client.DetectMultivariateLastAnomalyAsync("", options); +]]> +This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +{ +new VariableValues("",new List() +{ +"" +},new List() +{ +123.45F +}) }) { TopContributorCount = 1234, }; -var result = await client.DetectMultivariateLastAnomalyAsync("", options); -]]> - +Response response = await client.DetectMultivariateLastAnomalyAsync("", options); +]]> - -This sample shows how to call DetectMultivariateLastAnomaly with required parameters. + +This sample shows how to call DetectMultivariateLastAnomaly. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -var options = new MultivariateLastDetectionOptions(new VariableValues[] +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() { - new VariableValues("", new string[] +new VariableValues("",new List() { - "" - }, new float[] +"" +},new List() { - 3.14f - }) +123.45F +}) +}); +Response response = client.DetectMultivariateLastAnomaly("", options); +]]> +This sample shows how to call DetectMultivariateLastAnomaly with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +{ +new VariableValues("",new List() +{ +"" +},new List() +{ +123.45F +}) }) { TopContributorCount = 1234, }; -var result = client.DetectMultivariateLastAnomaly("", options); -]]> - +Response response = client.DetectMultivariateLastAnomaly("", options); +]]> - -This sample shows how to call DetectMultivariateLastAnomalyAsync with required parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, -}; + +This sample shows how to call DetectMultivariateLastAnomalyAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectMultivariateLastAnomalyAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, +}); +Response response = await client.DetectMultivariateLastAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, - topContributorCount = 1234, -}; +This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = await client.DetectMultivariateLastAnomalyAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, + ["topContributorCount"] = 1234, +}); +Response response = await client.DetectMultivariateLastAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); @@ -1154,58 +1386,65 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); -]]> - +]]> - -This sample shows how to call DetectMultivariateLastAnomaly with required parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, -}; + +This sample shows how to call DetectMultivariateLastAnomaly and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectMultivariateLastAnomaly("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, +}); +Response response = client.DetectMultivariateLastAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call DetectMultivariateLastAnomaly with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); - -var data = new { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, - topContributorCount = 1234, -}; +This sample shows how to call DetectMultivariateLastAnomaly with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -Response response = client.DetectMultivariateLastAnomaly("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, + ["topContributorCount"] = 1234, +}); +Response response = client.DetectMultivariateLastAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); @@ -1222,114 +1461,157 @@ Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetPrope Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); -]]> - +]]> - -This sample shows how to call GetMultivariateModelsAsync with required parameters. + +This sample shows how to call GetMultivariateModelsAsync. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234)) +await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync()) { } ]]> - +This sample shows how to call GetMultivariateModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync(skip: 1234, maxCount: 1234)) +{ +} +]]> - -This sample shows how to call GetMultivariateModels with required parameters. + +This sample shows how to call GetMultivariateModels. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -foreach (var item in client.GetMultivariateModels(1234, 1234)) +foreach (AnomalyDetectionModel item in client.GetMultivariateModels()) { } ]]> - +This sample shows how to call GetMultivariateModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +foreach (AnomalyDetectionModel item in client.GetMultivariateModels(skip: 1234, maxCount: 1234)) +{ +} +]]> - -This sample shows how to call GetMultivariateModelsAsync with required parameters and parse the result. + +This sample shows how to call GetMultivariateModelsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234, new RequestContext())) +await foreach (BinaryData item in client.GetMultivariateModelsAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); } ]]> - +This sample shows how to call GetMultivariateModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +await foreach (BinaryData item in client.GetMultivariateModelsAsync(1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSource").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSchema").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); +} +]]> - -This sample shows how to call GetMultivariateModels with required parameters and parse the result. + +This sample shows how to call GetMultivariateModels and parse the result. "); -var endpoint = new Uri(""); -var client = new AnomalyDetectorClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); -foreach (var item in client.GetMultivariateModels(1234, 1234, new RequestContext())) +foreach (BinaryData item in client.GetMultivariateModels(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); } ]]> - +This sample shows how to call GetMultivariateModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + +foreach (BinaryData item in client.GetMultivariateModels(1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSource").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSchema").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs b/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs index 089576b3804e..414fdc416b19 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/tests/Generated/Samples/Samples_AnomalyDetectorClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.AI.AnomalyDetector; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,20 +23,21 @@ public class Samples_AnomalyDetectorClient [Ignore("Only validating compilation of examples")] public void Example_DetectUnivariateEntireSeries() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - value = 123.45f, - } - }, - }; - - Response response = client.DetectUnivariateEntireSeries(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + }); + Response response = client.DetectUnivariateEntireSeries(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -52,28 +53,29 @@ public void Example_DetectUnivariateEntireSeries() [Ignore("Only validating compilation of examples")] public void Example_DetectUnivariateEntireSeries_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, - }; - - Response response = client.DetectUnivariateEntireSeries(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, + }); + Response response = client.DetectUnivariateEntireSeries(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -90,20 +92,21 @@ public void Example_DetectUnivariateEntireSeries_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DetectUnivariateEntireSeries_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - value = 123.45f, - } - }, - }; - - Response response = await client.DetectUnivariateEntireSeriesAsync(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + }); + Response response = await client.DetectUnivariateEntireSeriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -119,28 +122,29 @@ public async Task Example_DetectUnivariateEntireSeries_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectUnivariateEntireSeries_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, - }; - - Response response = await client.DetectUnivariateEntireSeriesAsync(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, + }); + Response response = await client.DetectUnivariateEntireSeriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -157,20 +161,21 @@ public async Task Example_DetectUnivariateEntireSeries_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DetectUnivariateLastPoint() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - value = 123.45f, - } - }, - }; - - Response response = client.DetectUnivariateLastPoint(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + }); + Response response = client.DetectUnivariateLastPoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -187,28 +192,29 @@ public void Example_DetectUnivariateLastPoint() [Ignore("Only validating compilation of examples")] public void Example_DetectUnivariateLastPoint_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, - }; - - Response response = client.DetectUnivariateLastPoint(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, + }); + Response response = client.DetectUnivariateLastPoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -224,22 +230,65 @@ public void Example_DetectUnivariateLastPoint_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DetectUnivariateLastPoint_Async() + public void Example_DetectUnivariateLastPoint_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new - { - series = new[] { - new { - value = 123.45f, + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +}); + Response response = client.DetectUnivariateLastPoint(options); } - }, + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DetectUnivariateLastPoint_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +{ +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}) + { + Granularity = TimeGranularity.Yearly, + CustomInterval = 1234, + Period = 1234, + MaxAnomalyRatio = 123.45F, + Sensitivity = 1234, + ImputeMode = ImputeMode.Auto, + ImputeFixedValue = 123.45F, }; + Response response = client.DetectUnivariateLastPoint(options); + } - Response response = await client.DetectUnivariateLastPointAsync(RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectUnivariateLastPoint_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + RequestContent content = RequestContent.Create(new Dictionary() + { + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + }); + Response response = await client.DetectUnivariateLastPointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -256,28 +305,29 @@ public async Task Example_DetectUnivariateLastPoint_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectUnivariateLastPoint_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45f, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45f, - }; - - Response response = await client.DetectUnivariateLastPointAsync(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["maxAnomalyRatio"] = 123.45F, + ["sensitivity"] = 1234, + ["imputeMode"] = "auto", + ["imputeFixedValue"] = 123.45F, + }); + Response response = await client.DetectUnivariateLastPointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -295,48 +345,64 @@ public async Task Example_DetectUnivariateLastPoint_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectUnivariateLastPoint_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var options = new UnivariateDetectionOptions(new TimeSeriesPoint[] - { - new TimeSeriesPoint(3.14f) + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() { - Timestamp = DateTimeOffset.UtcNow, - } - }) +new TimeSeriesPoint(123.45F) +}); + Response response = await client.DetectUnivariateLastPointAsync(options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectUnivariateLastPoint_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + UnivariateDetectionOptions options = new UnivariateDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +{ +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}) { Granularity = TimeGranularity.Yearly, CustomInterval = 1234, Period = 1234, - MaxAnomalyRatio = 3.14f, + MaxAnomalyRatio = 123.45F, Sensitivity = 1234, ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 3.14f, + ImputeFixedValue = 123.45F, }; - var result = await client.DetectUnivariateLastPointAsync(options); + Response response = await client.DetectUnivariateLastPointAsync(options); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DetectUnivariateChangePoint() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - value = 123.45f, - } - }, - granularity = "yearly", - }; - - Response response = client.DetectUnivariateChangePoint(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + }); + Response response = client.DetectUnivariateChangePoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -346,26 +412,27 @@ public void Example_DetectUnivariateChangePoint() [Ignore("Only validating compilation of examples")] public void Example_DetectUnivariateChangePoint_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45f, - }; - - Response response = client.DetectUnivariateChangePoint(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["stableTrendWindow"] = 1234, + ["threshold"] = 123.45F, + }); + Response response = client.DetectUnivariateChangePoint(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -375,23 +442,63 @@ public void Example_DetectUnivariateChangePoint_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DetectUnivariateChangePoint_Async() + public void Example_DetectUnivariateChangePoint_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new - { - series = new[] { - new { - value = 123.45f, + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +}, TimeGranularity.Yearly); + Response response = client.DetectUnivariateChangePoint(options); } - }, - granularity = "yearly", + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DetectUnivariateChangePoint_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +{ +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, TimeGranularity.Yearly) + { + CustomInterval = 1234, + Period = 1234, + StableTrendWindow = 1234, + Threshold = 123.45F, }; + Response response = client.DetectUnivariateChangePoint(options); + } - Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectUnivariateChangePoint_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + RequestContent content = RequestContent.Create(new Dictionary() + { + ["series"] = new List() +{ +new Dictionary() +{ +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + }); + Response response = await client.DetectUnivariateChangePointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -401,26 +508,27 @@ public async Task Example_DetectUnivariateChangePoint_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectUnivariateChangePoint_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - series = new[] { - new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", - value = 123.45f, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45f, - }; - - Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data)); + ["series"] = new List() +{ +new Dictionary() +{ +["timestamp"] = "2022-05-10T14:57:31.2311892-04:00", +["value"] = 123.45F, +} +}, + ["granularity"] = "yearly", + ["customInterval"] = 1234, + ["period"] = 1234, + ["stableTrendWindow"] = 1234, + ["threshold"] = 123.45F, + }); + Response response = await client.DetectUnivariateChangePointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -432,35 +540,50 @@ public async Task Example_DetectUnivariateChangePoint_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectUnivariateChangePoint_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] - { - new TimeSeriesPoint(3.14f) + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() { - Timestamp = DateTimeOffset.UtcNow, - } - }, TimeGranularity.Yearly) +new TimeSeriesPoint(123.45F) +}, TimeGranularity.Yearly); + Response response = await client.DetectUnivariateChangePointAsync(options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectUnivariateChangePoint_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new List() +{ +new TimeSeriesPoint(123.45F) +{ +Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, TimeGranularity.Yearly) { CustomInterval = 1234, Period = 1234, StableTrendWindow = 1234, - Threshold = 3.14f, + Threshold = 123.45F, }; - var result = await client.DetectUnivariateChangePointAsync(options); + Response response = await client.DetectUnivariateChangePointAsync(options); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetMultivariateBatchDetectionResult() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = client.GetMultivariateBatchDetectionResult(Guid.NewGuid(), new RequestContext()); + Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -475,11 +598,11 @@ public void Example_GetMultivariateBatchDetectionResult() [Ignore("Only validating compilation of examples")] public void Example_GetMultivariateBatchDetectionResult_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = client.GetMultivariateBatchDetectionResult(Guid.NewGuid(), new RequestContext()); + Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -506,15 +629,37 @@ public void Example_GetMultivariateBatchDetectionResult_AllParameters() Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetMultivariateBatchDetectionResult_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetMultivariateBatchDetectionResult_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateBatchDetectionResult_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid(), new RequestContext()); + Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -529,11 +674,11 @@ public async Task Example_GetMultivariateBatchDetectionResult_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateBatchDetectionResult_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid(), new RequestContext()); + Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -564,29 +709,39 @@ public async Task Example_GetMultivariateBatchDetectionResult_AllParameters_Asyn [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateBatchDetectionResult_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var result = await client.GetMultivariateBatchDetectionResultAsync(Guid.NewGuid()); + Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetMultivariateBatchDetectionResult_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); } [Test] [Ignore("Only validating compilation of examples")] public void Example_TrainMultivariateModel() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - }; - - Response response = client.TrainMultivariateModel(RequestContent.Create(data)); + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + }); + Response response = client.TrainMultivariateModel(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -598,27 +753,26 @@ public void Example_TrainMultivariateModel() [Ignore("Only validating compilation of examples")] public void Example_TrainMultivariateModel_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - dataSource = "http://localhost:3000", - dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - displayName = "", - slidingWindow = 1234, - alignPolicy = new + ["dataSource"] = "http://localhost:3000", + ["dataSchema"] = "OneTable", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["displayName"] = "", + ["slidingWindow"] = 1234, + ["alignPolicy"] = new Dictionary() { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45f, + ["alignMode"] = "Inner", + ["fillNAMethod"] = "Previous", + ["paddingValue"] = 123.45F, }, - }; - - Response response = client.TrainMultivariateModel(RequestContent.Create(data)); + }); + Response response = client.TrainMultivariateModel(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -649,20 +803,54 @@ public void Example_TrainMultivariateModel_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_TrainMultivariateModel_Async() + public void Example_TrainMultivariateModel_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Response response = client.TrainMultivariateModel(modelInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TrainMultivariateModel_AllParameters_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + DataSchema = DataSchema.OneTable, + DisplayName = "", + SlidingWindow = 1234, + AlignPolicy = new AlignPolicy() + { + AlignMode = AlignMode.Inner, + FillNAMethod = FillNAMethod.Previous, + PaddingValue = 123.45F, + }, }; + Response response = client.TrainMultivariateModel(modelInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TrainMultivariateModel_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = await client.TrainMultivariateModelAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary() + { + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + }); + Response response = await client.TrainMultivariateModelAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -674,27 +862,26 @@ public async Task Example_TrainMultivariateModel_Async() [Ignore("Only validating compilation of examples")] public async Task Example_TrainMultivariateModel_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - dataSource = "http://localhost:3000", - dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - displayName = "", - slidingWindow = 1234, - alignPolicy = new + ["dataSource"] = "http://localhost:3000", + ["dataSchema"] = "OneTable", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["displayName"] = "", + ["slidingWindow"] = 1234, + ["alignPolicy"] = new Dictionary() { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45f, + ["alignMode"] = "Inner", + ["fillNAMethod"] = "Previous", + ["paddingValue"] = 123.45F, }, - }; - - Response response = await client.TrainMultivariateModelAsync(RequestContent.Create(data)); + }); + Response response = await client.TrainMultivariateModelAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -727,32 +914,44 @@ public async Task Example_TrainMultivariateModel_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_TrainMultivariateModel_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.UtcNow, DateTimeOffset.UtcNow) + ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Response response = await client.TrainMultivariateModelAsync(modelInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TrainMultivariateModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + ModelInfo modelInfo = new ModelInfo(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { DataSchema = DataSchema.OneTable, - DisplayName = "", + DisplayName = "", SlidingWindow = 1234, AlignPolicy = new AlignPolicy() { AlignMode = AlignMode.Inner, FillNAMethod = FillNAMethod.Previous, - PaddingValue = 3.14f, + PaddingValue = 123.45F, }, }; - var result = await client.TrainMultivariateModelAsync(modelInfo); + Response response = await client.TrainMultivariateModelAsync(modelInfo); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeleteMultivariateModel() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = client.DeleteMultivariateModel(""); Console.WriteLine(response.Status); @@ -762,9 +961,9 @@ public void Example_DeleteMultivariateModel() [Ignore("Only validating compilation of examples")] public void Example_DeleteMultivariateModel_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = client.DeleteMultivariateModel(""); Console.WriteLine(response.Status); @@ -774,9 +973,9 @@ public void Example_DeleteMultivariateModel_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteMultivariateModel_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = await client.DeleteMultivariateModelAsync(""); Console.WriteLine(response.Status); @@ -786,9 +985,9 @@ public async Task Example_DeleteMultivariateModel_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteMultivariateModel_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); Response response = await client.DeleteMultivariateModelAsync(""); Console.WriteLine(response.Status); @@ -798,11 +997,11 @@ public async Task Example_DeleteMultivariateModel_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetMultivariateModel() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = client.GetMultivariateModel("", new RequestContext()); + Response response = client.GetMultivariateModel("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -814,11 +1013,11 @@ public void Example_GetMultivariateModel() [Ignore("Only validating compilation of examples")] public void Example_GetMultivariateModel_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = client.GetMultivariateModel("", new RequestContext()); + Response response = client.GetMultivariateModel("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -847,15 +1046,37 @@ public void Example_GetMultivariateModel_AllParameters() Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetMultivariateModel_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + Response response = client.GetMultivariateModel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetMultivariateModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + Response response = client.GetMultivariateModel(""); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateModel_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = await client.GetMultivariateModelAsync("", new RequestContext()); + Response response = await client.GetMultivariateModelAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -867,11 +1088,11 @@ public async Task Example_GetMultivariateModel_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateModel_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = await client.GetMultivariateModelAsync("", new RequestContext()); + Response response = await client.GetMultivariateModelAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -904,29 +1125,39 @@ public async Task Example_GetMultivariateModel_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateModel_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var result = await client.GetMultivariateModelAsync(""); + Response response = await client.GetMultivariateModelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetMultivariateModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + Response response = await client.GetMultivariateModelAsync(""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DetectMultivariateBatchAnomaly() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - }; - - Response response = client.DetectMultivariateBatchAnomaly("", RequestContent.Create(data)); + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + }); + Response response = client.DetectMultivariateBatchAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -941,19 +1172,18 @@ public void Example_DetectMultivariateBatchAnomaly() [Ignore("Only validating compilation of examples")] public void Example_DetectMultivariateBatchAnomaly_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - }; - - Response response = client.DetectMultivariateBatchAnomaly("", RequestContent.Create(data)); + ["dataSource"] = "http://localhost:3000", + ["topContributorCount"] = 1234, + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + }); + Response response = client.DetectMultivariateBatchAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -982,20 +1212,46 @@ public void Example_DetectMultivariateBatchAnomaly_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DetectMultivariateBatchAnomaly_Async() + public void Example_DetectMultivariateBatchAnomaly_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Response response = client.DetectMultivariateBatchAnomaly("", options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DetectMultivariateBatchAnomaly_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { - dataSource = "http://localhost:3000", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + TopContributorCount = 1234, }; + Response response = client.DetectMultivariateBatchAnomaly("", options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectMultivariateBatchAnomaly_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - Response response = await client.DetectMultivariateBatchAnomalyAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary() + { + ["dataSource"] = "http://localhost:3000", + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + }); + Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -1010,19 +1266,18 @@ public async Task Example_DetectMultivariateBatchAnomaly_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectMultivariateBatchAnomaly_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", - }; - - Response response = await client.DetectMultivariateBatchAnomalyAsync("", RequestContent.Create(data)); + ["dataSource"] = "http://localhost:3000", + ["topContributorCount"] = 1234, + ["startTime"] = "2022-05-10T14:57:31.2311892-04:00", + ["endTime"] = "2022-05-10T14:57:31.2311892-04:00", + }); + Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -1053,41 +1308,56 @@ public async Task Example_DetectMultivariateBatchAnomaly_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectMultivariateBatchAnomaly_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.UtcNow, DateTimeOffset.UtcNow) + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectMultivariateBatchAnomaly_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) { TopContributorCount = 1234, }; - var result = await client.DetectMultivariateBatchAnomalyAsync("", options); + Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DetectMultivariateLastAnomaly() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, - }; - - Response response = client.DetectMultivariateLastAnomaly("", RequestContent.Create(data)); + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, + }); + Response response = client.DetectMultivariateLastAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1097,27 +1367,30 @@ public void Example_DetectMultivariateLastAnomaly() [Ignore("Only validating compilation of examples")] public void Example_DetectMultivariateLastAnomaly_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, - topContributorCount = 1234, - }; - - Response response = client.DetectMultivariateLastAnomaly("", RequestContent.Create(data)); + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, + ["topContributorCount"] = 1234, + }); + Response response = client.DetectMultivariateLastAnomaly("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); @@ -1138,28 +1411,76 @@ public void Example_DetectMultivariateLastAnomaly_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DetectMultivariateLastAnomaly_Async() + public void Example_DetectMultivariateLastAnomaly_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +{ +new VariableValues("",new List() +{ +"" +},new List() +{ +123.45F +}) +}); + Response response = client.DetectMultivariateLastAnomaly("", options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DetectMultivariateLastAnomaly_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +{ +new VariableValues("",new List() +{ +"" +},new List() +{ +123.45F +}) +}) { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, + TopContributorCount = 1234, }; + Response response = client.DetectMultivariateLastAnomaly("", options); + } - Response response = await client.DetectMultivariateLastAnomalyAsync("", RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectMultivariateLastAnomaly_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + RequestContent content = RequestContent.Create(new Dictionary() + { + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, + }); + Response response = await client.DetectMultivariateLastAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1169,27 +1490,30 @@ public async Task Example_DetectMultivariateLastAnomaly_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectMultivariateLastAnomaly_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - variables = new[] { - new { - variable = "", - timestamps = new[] { - "" - }, - values = new[] { - 123.45f - }, - } - }, - topContributorCount = 1234, - }; - - Response response = await client.DetectMultivariateLastAnomalyAsync("", RequestContent.Create(data)); + ["variables"] = new List() +{ +new Dictionary() +{ +["variable"] = "", +["timestamps"] = new List() +{ +"" +}, +["values"] = new List() +{ +123.45F +}, +} +}, + ["topContributorCount"] = 1234, + }); + Response response = await client.DetectMultivariateLastAnomalyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); @@ -1212,40 +1536,61 @@ public async Task Example_DetectMultivariateLastAnomaly_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DetectMultivariateLastAnomaly_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - var options = new MultivariateLastDetectionOptions(new VariableValues[] - { - new VariableValues("", new string[] + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +{ +new VariableValues("",new List() { - "" - }, new float[] +"" +},new List() { - 3.14f - }) - }) +123.45F +}) +}); + Response response = await client.DetectMultivariateLastAnomalyAsync("", options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DetectMultivariateLastAnomaly_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new List() +{ +new VariableValues("",new List() +{ +"" +},new List() +{ +123.45F +}) +}) { TopContributorCount = 1234, }; - var result = await client.DetectMultivariateLastAnomalyAsync("", options); + Response response = await client.DetectMultivariateLastAnomalyAsync("", options); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetMultivariateModels() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - foreach (var item in client.GetMultivariateModels(1234, 1234, new RequestContext())) + foreach (BinaryData item in client.GetMultivariateModels(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); } } @@ -1253,37 +1598,63 @@ public void Example_GetMultivariateModels() [Ignore("Only validating compilation of examples")] public void Example_GetMultivariateModels_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - foreach (var item in client.GetMultivariateModels(1234, 1234, new RequestContext())) + foreach (BinaryData item in client.GetMultivariateModels(1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSource").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSchema").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetMultivariateModels_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + foreach (AnomalyDetectionModel item in client.GetMultivariateModels()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetMultivariateModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + foreach (AnomalyDetectionModel item in client.GetMultivariateModels(skip: 1234, maxCount: 1234)) + { } } @@ -1291,16 +1662,16 @@ public void Example_GetMultivariateModels_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateModels_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234, new RequestContext())) + await foreach (BinaryData item in client.GetMultivariateModelsAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); } } @@ -1308,37 +1679,37 @@ public async Task Example_GetMultivariateModels_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateModels_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234, new RequestContext())) + await foreach (BinaryData item in client.GetMultivariateModelsAsync(1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSource").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("dataSchema").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } } @@ -1346,11 +1717,24 @@ public async Task Example_GetMultivariateModels_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMultivariateModels_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new AnomalyDetectorClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); + + await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetMultivariateModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnomalyDetectorClient client = new AnomalyDetectorClient(endpoint, credential); - await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234)) + await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync(skip: 1234, maxCount: 1234)) { } } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Docs/ConfigurationClient.xml b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Docs/ConfigurationClient.xml index 7738a8e38370..175760201508 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Docs/ConfigurationClient.xml +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Docs/ConfigurationClient.xml @@ -1,89 +1,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Generated/Samples/Samples_ConfigurationClient.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Generated/Samples/Samples_ConfigurationClient.cs index 7b6cf66a90cc..cae283a0de5a 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Generated/Samples/Samples_ConfigurationClient.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/Generated/Samples/Samples_ConfigurationClient.cs @@ -5,12 +5,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using Azure; -using Azure.Core; using Azure.Identity; namespace Azure.Data.AppConfiguration.Samples diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml index 4275dafca8b6..42934396a913 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml @@ -2,182 +2,182 @@ - -This sample shows how to call AnalyzeConversationAsync with required request content, and how to parse the result. + +This sample shows how to call AnalyzeConversationAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - analysisInput = new { - conversationItem = new { - text = "", - id = "", - participantId = "", +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["analysisInput"] = new Dictionary() + { + ["conversationItem"] = new Dictionary() + { + ["id"] = "", + ["participantId"] = "", }, }, - parameters = new { - projectName = "", - deploymentName = "", + ["parameters"] = new Dictionary() + { + ["projectName"] = "", + ["deploymentName"] = "", }, - kind = "Conversation", -}; - -Response response = await client.AnalyzeConversationAsync(RequestContent.Create(data)); + ["kind"] = "Conversation", +}); +Response response = await client.AnalyzeConversationAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); ]]> -This sample shows how to call AnalyzeConversationAsync with all request content, and how to parse the result. +This sample shows how to call AnalyzeConversationAsync with all request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - analysisInput = new { - conversationItem = new { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["analysisInput"] = new Dictionary() + { + ["conversationItem"] = new Dictionary() + { + ["id"] = "", + ["participantId"] = "", + ["language"] = "", + ["modality"] = "transcript", + ["role"] = "agent", }, }, - parameters = new { - projectName = "", - deploymentName = "", - verbose = true, - isLoggingEnabled = true, - stringIndexType = "Utf16CodeUnit", - directTarget = "", - targetProjectParameters = new { - key = new { - query = "", - callingOptions = new { - verbose = true, - log = true, - show_all_intents = true, - timezoneOffset = 123.45f, - spellCheck = true, - bing_spell_check_subscription_key = "", + ["parameters"] = new Dictionary() + { + ["projectName"] = "", + ["deploymentName"] = "", + ["verbose"] = true, + ["isLoggingEnabled"] = true, + ["stringIndexType"] = "Utf16CodeUnit", + ["directTarget"] = "", + ["targetProjectParameters"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["query"] = "", + ["callingOptions"] = new Dictionary() + { + ["verbose"] = true, + ["log"] = true, + ["show-all-intents"] = true, + ["timezoneOffset"] = 123.45F, + ["spellCheck"] = true, + ["bing-spell-check-subscription-key"] = "", }, - targetProjectKind = "Luis", - apiVersion = "", + ["targetProjectKind"] = "Luis", + ["apiVersion"] = "", }, }, }, - kind = "Conversation", -}; - -Response response = await client.AnalyzeConversationAsync(RequestContent.Create(data)); + ["kind"] = "Conversation", +}); +Response response = await client.AnalyzeConversationAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversation-analysis-runtime/analyze-conversation - - +]]> - -This sample shows how to call AnalyzeConversation with required request content, and how to parse the result. + +This sample shows how to call AnalyzeConversation and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - analysisInput = new { - conversationItem = new { - text = "", - id = "", - participantId = "", +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["analysisInput"] = new Dictionary() + { + ["conversationItem"] = new Dictionary() + { + ["id"] = "", + ["participantId"] = "", }, }, - parameters = new { - projectName = "", - deploymentName = "", + ["parameters"] = new Dictionary() + { + ["projectName"] = "", + ["deploymentName"] = "", }, - kind = "Conversation", -}; - -Response response = client.AnalyzeConversation(RequestContent.Create(data)); + ["kind"] = "Conversation", +}); +Response response = client.AnalyzeConversation(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); ]]> -This sample shows how to call AnalyzeConversation with all request content, and how to parse the result. +This sample shows how to call AnalyzeConversation with all request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - analysisInput = new { - conversationItem = new { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["analysisInput"] = new Dictionary() + { + ["conversationItem"] = new Dictionary() + { + ["id"] = "", + ["participantId"] = "", + ["language"] = "", + ["modality"] = "transcript", + ["role"] = "agent", }, }, - parameters = new { - projectName = "", - deploymentName = "", - verbose = true, - isLoggingEnabled = true, - stringIndexType = "Utf16CodeUnit", - directTarget = "", - targetProjectParameters = new { - key = new { - query = "", - callingOptions = new { - verbose = true, - log = true, - show_all_intents = true, - timezoneOffset = 123.45f, - spellCheck = true, - bing_spell_check_subscription_key = "", + ["parameters"] = new Dictionary() + { + ["projectName"] = "", + ["deploymentName"] = "", + ["verbose"] = true, + ["isLoggingEnabled"] = true, + ["stringIndexType"] = "Utf16CodeUnit", + ["directTarget"] = "", + ["targetProjectParameters"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["query"] = "", + ["callingOptions"] = new Dictionary() + { + ["verbose"] = true, + ["log"] = true, + ["show-all-intents"] = true, + ["timezoneOffset"] = 123.45F, + ["spellCheck"] = true, + ["bing-spell-check-subscription-key"] = "", }, - targetProjectKind = "Luis", - apiVersion = "", + ["targetProjectKind"] = "Luis", + ["apiVersion"] = "", }, }, }, - kind = "Conversation", -}; - -Response response = client.AnalyzeConversation(RequestContent.Create(data)); + ["kind"] = "Conversation", +}); +Response response = client.AnalyzeConversation(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversation-analysis-runtime/analyze-conversation - - +]]> - -This sample shows how to call GetAnalyzeConversationJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetAnalyzeConversationJobStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.NewGuid()); +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -185,13 +185,13 @@ Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call GetAnalyzeConversationJobStatusAsync with all parameters, and how to parse the result. +This sample shows how to call GetAnalyzeConversationJobStatusAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.NewGuid(), true); +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), showStats: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); @@ -208,31 +208,24 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/analyze-conversation/job-status - - +]]> - -This sample shows how to call GetAnalyzeConversationJobStatus with required parameters and parse the result. + +This sample shows how to call GetAnalyzeConversationJobStatus and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -Response response = client.GetAnalyzeConversationJobStatus(Guid.NewGuid()); +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -240,13 +233,13 @@ Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call GetAnalyzeConversationJobStatus with all parameters, and how to parse the result. +This sample shows how to call GetAnalyzeConversationJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -Response response = client.GetAnalyzeConversationJobStatus(Guid.NewGuid(), true); +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), showStats: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); @@ -263,109 +256,118 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/analyze-conversation/job-status - - +]]> - -This sample shows how to call AnalyzeConversationsAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call AnalyzeConversationsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - analysisInput = new { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - } - }, - id = "", - language = "", - modality = "text", - } - }, - }, - tasks = new[] { - new { - kind = "ConversationalSummarizationTask", - } +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["analysisInput"] = new Dictionary() + { + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +} +}, }, -}; - -var operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["kind"] = "ConversationalSummarizationTask", +} +}, +}); +Operation operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call AnalyzeConversationsAsync with all parameters and request content, and how to parse the result. +This sample shows how to call AnalyzeConversationsAsync with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - displayName = "", - analysisInput = new { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", - } - }, - id = "", - language = "", - modality = "text", - domain = "finance", - } - }, - }, - tasks = new[] { - new { - parameters = new { - summaryAspects = new[] { - "issue" - }, - modelVersion = "", - loggingOptOut = true, - }, - kind = "ConversationalSummarizationTask", - taskName = "", - } +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["displayName"] = "", + ["analysisInput"] = new Dictionary() + { + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +["language"] = "", +["modality"] = "transcript", +["role"] = "agent", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +["domain"] = "finance", +} +}, }, -}; - -var operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["summaryAspects"] = new List() +{ +"issue" +}, +["modelVersion"] = "", +["loggingOptOut"] = true, +}, +["kind"] = "ConversationalSummarizationTask", +["taskName"] = "", +} +}, +}); +Operation operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -381,109 +383,118 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/analyze-conversation/submit-job - - +]]> - -This sample shows how to call AnalyzeConversations with required parameters and request content, and how to parse the result. + +This sample shows how to call AnalyzeConversations and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - analysisInput = new { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - } - }, - id = "", - language = "", - modality = "text", - } - }, +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["analysisInput"] = new Dictionary() + { + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +} +}, }, - tasks = new[] { - new { - kind = "ConversationalSummarizationTask", - } - }, -}; - -var operation = client.AnalyzeConversations(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["kind"] = "ConversationalSummarizationTask", +} +}, +}); +Operation operation = client.AnalyzeConversations(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call AnalyzeConversations with all parameters and request content, and how to parse the result. +This sample shows how to call AnalyzeConversations with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var data = new { - displayName = "", - analysisInput = new { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", - } - }, - id = "", - language = "", - modality = "text", - domain = "finance", - } - }, - }, - tasks = new[] { - new { - parameters = new { - summaryAspects = new[] { - "issue" - }, - modelVersion = "", - loggingOptOut = true, - }, - kind = "ConversationalSummarizationTask", - taskName = "", - } +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["displayName"] = "", + ["analysisInput"] = new Dictionary() + { + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +["language"] = "", +["modality"] = "transcript", +["role"] = "agent", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +["domain"] = "finance", +} +}, }, -}; - -var operation = client.AnalyzeConversations(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["summaryAspects"] = new List() +{ +"issue" +}, +["modelVersion"] = "", +["loggingOptOut"] = true, +}, +["kind"] = "ConversationalSummarizationTask", +["taskName"] = "", +} +}, +}); +Operation operation = client.AnalyzeConversations(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -499,61 +510,52 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/analyze-conversation/submit-job - - +]]> - -This sample shows how to call CancelAnalyzeConversationsAsync with required parameters. + +This sample shows how to call CancelAnalyzeConversationsAsync. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -var operation = await client.CancelAnalyzeConversationsAsync(WaitUntil.Completed, Guid.NewGuid()); - -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.CancelAnalyzeConversationsAsync(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/analyze-conversation/cancel-job +This sample shows how to call CancelAnalyzeConversationsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - +Operation operation = await client.CancelAnalyzeConversationsAsync(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> - -This sample shows how to call CancelAnalyzeConversations with required parameters. + +This sample shows how to call CancelAnalyzeConversations. "); -var endpoint = new Uri(""); -var client = new ConversationAnalysisClient(endpoint, credential); - -var operation = client.CancelAnalyzeConversations(WaitUntil.Completed, Guid.NewGuid()); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.CancelAnalyzeConversations(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/analyze-conversation/cancel-job +This sample shows how to call CancelAnalyzeConversations with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - +Operation operation = client.CancelAnalyzeConversations(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +]]> \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAuthoringClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAuthoringClient.xml index 2467017d890d..4e7f92f532fe 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAuthoringClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAuthoringClient.xml @@ -2,20 +2,20 @@ - -This sample shows how to call CreateProjectAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateProjectAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var data = new { - projectKind = "Conversation", - projectName = "", - language = "", -}; - -Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", +}); +Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -24,24 +24,25 @@ Console.WriteLine(result.GetProperty("projectKind").ToString()); Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("language").ToString()); ]]> -This sample shows how to call CreateProjectAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateProjectAsync with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var data = new { - projectKind = "Conversation", - settings = new { - confidenceThreshold = 123.45f, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() + { + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", -}; - -Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", +}); +Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -54,30 +55,23 @@ Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("multilingual").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("language").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/create-project - - +]]> - -This sample shows how to call CreateProject with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateProject and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - projectKind = "Conversation", - projectName = "", - language = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Response response = client.CreateProject("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", +}); +Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -86,24 +80,25 @@ Console.WriteLine(result.GetProperty("projectKind").ToString()); Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("language").ToString()); ]]> -This sample shows how to call CreateProject with all parameters and request content, and how to parse the result. +This sample shows how to call CreateProject with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var data = new { - projectKind = "Conversation", - settings = new { - confidenceThreshold = 123.45f, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() + { + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", -}; - -Response response = client.CreateProject("", RequestContent.Create(data)); + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", +}); +Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -116,22 +111,30 @@ Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("multilingual").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("language").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/create-project - - +]]> - -This sample shows how to call GetProjectAsync with required parameters and parse the result. + +This sample shows how to call GetProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetProjectAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProjectAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetProjectAsync(""); @@ -146,22 +149,30 @@ Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("multilingual").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("language").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-project - - +]]> - -This sample shows how to call GetProject with required parameters and parse the result. + +This sample shows how to call GetProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetProject(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProject with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetProject(""); @@ -176,22 +187,15 @@ Console.WriteLine(result.GetProperty("projectName").ToString()); Console.WriteLine(result.GetProperty("multilingual").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("language").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-project - - +]]> - -This sample shows how to call GetDeploymentAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetDeploymentAsync("", ""); @@ -203,21 +207,30 @@ Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); ]]> - - +This sample shows how to call GetDeploymentAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-deployment +Response response = await client.GetDeploymentAsync("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> - -This sample shows how to call GetDeployment with required parameters and parse the result. + +This sample shows how to call GetDeployment and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetDeployment("", ""); @@ -229,21 +242,44 @@ Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); ]]> - - +This sample shows how to call GetDeployment with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-deployment +Response response = client.GetDeployment("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> - -This sample shows how to call GetDeploymentJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetDeploymentJobStatusAsync("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentJobStatusAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetDeploymentJobStatusAsync("", "", ""); @@ -263,28 +299,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-deployment-status - - +]]> - -This sample shows how to call GetDeploymentJobStatus with required parameters and parse the result. + +This sample shows how to call GetDeploymentJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetDeploymentJobStatus("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetDeploymentJobStatus("", "", ""); @@ -304,28 +347,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-deployment-status - - +]]> - -This sample shows how to call GetSwapDeploymentsJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetSwapDeploymentsJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetSwapDeploymentsJobStatusAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsJobStatusAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetSwapDeploymentsJobStatusAsync("", ""); @@ -345,28 +395,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-swap-deployments-status - - +]]> - -This sample shows how to call GetSwapDeploymentsJobStatus with required parameters and parse the result. + +This sample shows how to call GetSwapDeploymentsJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetSwapDeploymentsJobStatus("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetSwapDeploymentsJobStatus("", ""); @@ -386,28 +443,32 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-swap-deployments-status - - +]]> - -This sample shows how to call GetExportProjectJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetExportProjectJobStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetExportProjectJobStatusAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetExportProjectJobStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetExportProjectJobStatusAsync("", ""); @@ -428,28 +489,32 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-export-status - - +]]> - -This sample shows how to call GetExportProjectJobStatus with required parameters and parse the result. + +This sample shows how to call GetExportProjectJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetExportProjectJobStatus("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetExportProjectJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetExportProjectJobStatus("", ""); @@ -470,28 +535,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-export-status - - +]]> - -This sample shows how to call GetImportProjectJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetImportProjectJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetImportProjectJobStatusAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportProjectJobStatusAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetImportProjectJobStatusAsync("", ""); @@ -511,28 +583,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-import-status - - +]]> - -This sample shows how to call GetImportProjectJobStatus with required parameters and parse the result. + +This sample shows how to call GetImportProjectJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetImportProjectJobStatus("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportProjectJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetImportProjectJobStatus("", ""); @@ -552,28 +631,21 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-import-status - - +]]> - -This sample shows how to call GetTrainedModelAsync with required parameters and parse the result. + +This sample shows how to call GetTrainedModelAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetTrainedModelAsync("", ""); @@ -586,21 +658,31 @@ Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); ]]> - - +This sample shows how to call GetTrainedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-trained-model +Response response = await client.GetTrainedModelAsync("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> - -This sample shows how to call GetTrainedModel with required parameters and parse the result. + +This sample shows how to call GetTrainedModel and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetTrainedModel("", ""); @@ -613,165 +695,259 @@ Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); ]]> - - +This sample shows how to call GetTrainedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-trained-model +Response response = client.GetTrainedModel("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> - -This sample shows how to call DeleteTrainedModelAsync with required parameters. + +This sample shows how to call DeleteTrainedModelAsync. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.DeleteTrainedModelAsync("", ""); Console.WriteLine(response.Status); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/delete-trained-model +This sample shows how to call DeleteTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +Response response = await client.DeleteTrainedModelAsync("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTrainedModel with required parameters. + +This sample shows how to call DeleteTrainedModel. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.DeleteTrainedModel("", ""); Console.WriteLine(response.Status); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/delete-trained-model +This sample shows how to call DeleteTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +Response response = client.DeleteTrainedModel("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetModelEvaluationSummaryAsync with required parameters and parse the result. + +This sample shows how to call GetModelEvaluationSummaryAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetModelEvaluationSummaryAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); -Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); -Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); ]]> - - +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-model-evaluation-summary +Response response = await client.GetModelEvaluationSummaryAsync("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> - -This sample shows how to call GetModelEvaluationSummary with required parameters and parse the result. + +This sample shows how to call GetModelEvaluationSummary and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetModelEvaluationSummary("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); -Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); -Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); -Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); -Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); ]]> - - +This sample shows how to call GetModelEvaluationSummary with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-model-evaluation-summary +Response response = client.GetModelEvaluationSummary("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> - -This sample shows how to call GetLoadSnapshotJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetLoadSnapshotJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetLoadSnapshotJobStatusAsync("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotJobStatusAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetLoadSnapshotJobStatusAsync("", "", ""); @@ -791,28 +967,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-load-snapshot-status - - +]]> - -This sample shows how to call GetLoadSnapshotJobStatus with required parameters and parse the result. + +This sample shows how to call GetLoadSnapshotJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetLoadSnapshotJobStatus("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetLoadSnapshotJobStatus("", "", ""); @@ -832,37 +1015,48 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-load-snapshot-status - - +]]> - -This sample shows how to call GetTrainingJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetTrainingJobStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetTrainingJobStatusAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); -Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingJobStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetTrainingJobStatusAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); @@ -885,28 +1079,39 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-training-status - - +]]> - -This sample shows how to call GetTrainingJobStatus with required parameters and parse the result. + +This sample shows how to call GetTrainingJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetTrainingJobStatus("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetTrainingJobStatus("", ""); @@ -938,28 +1143,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-training-status - - +]]> - -This sample shows how to call GetProjectDeletionJobStatusAsync with required parameters and parse the result. + +This sample shows how to call GetProjectDeletionJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = await client.GetProjectDeletionJobStatusAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionJobStatusAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetProjectDeletionJobStatusAsync(""); @@ -979,28 +1191,35 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-project-deletion-status - - +]]> - -This sample shows how to call GetProjectDeletionJobStatus with required parameters and parse the result. + +This sample shows how to call GetProjectDeletionJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Response response = client.GetProjectDeletionJobStatus(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionJobStatus with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetProjectDeletionJobStatus(""); @@ -1020,584 +1239,672 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-project-deletion-status - - +]]> - + This sample shows how to call GetProjectsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetProjectsAsync()) +await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("projectKind").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("multilingual").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-projects +This sample shows how to call GetProjectsAsync with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetProjectsAsync()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("multilingual").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); +} +]]> - + This sample shows how to call GetProjects and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetProjects()) +foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("projectKind").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("multilingual").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-projects +This sample shows how to call GetProjects with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetProjects()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("multilingual").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); +} +]]> - -This sample shows how to call GetDeploymentsAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetDeploymentsAsync("")) +await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-deployments +This sample shows how to call GetDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetDeploymentsAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> - -This sample shows how to call GetDeployments with required parameters and parse the result. + +This sample shows how to call GetDeployments and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetDeployments("")) +foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-deployments +This sample shows how to call GetDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetDeployments("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> - -This sample shows how to call GetTrainedModelsAsync with required parameters and parse the result. + +This sample shows how to call GetTrainedModelsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetTrainedModelsAsync("")) +await foreach (BinaryData item in client.GetTrainedModelsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("label").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-trained-models +This sample shows how to call GetTrainedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetTrainedModelsAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); +} +]]> - -This sample shows how to call GetTrainedModels with required parameters and parse the result. + +This sample shows how to call GetTrainedModels and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetTrainedModels("")) +foreach (BinaryData item in client.GetTrainedModels("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("label").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-trained-models +This sample shows how to call GetTrainedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetTrainedModels("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); +} +]]> - -This sample shows how to call GetModelEvaluationResultsAsync with required parameters and parse the result. + +This sample shows how to call GetModelEvaluationResultsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetModelEvaluationResultsAsync("", "")) +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } ]]> -This sample shows how to call GetModelEvaluationResultsAsync with all parameters, and how to parse the result. +This sample shows how to call GetModelEvaluationResultsAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-model-evaluation-results - - +]]> - -This sample shows how to call GetModelEvaluationResults with required parameters and parse the result. + +This sample shows how to call GetModelEvaluationResults and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetModelEvaluationResults("", "")) +foreach (BinaryData item in client.GetModelEvaluationResults("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } ]]> -This sample shows how to call GetModelEvaluationResults with all parameters, and how to parse the result. +This sample shows how to call GetModelEvaluationResults with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) +foreach (BinaryData item in client.GetModelEvaluationResults("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-model-evaluation-results - - +]]> - -This sample shows how to call GetTrainingJobsAsync with required parameters and parse the result. + +This sample shows how to call GetTrainingJobsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetTrainingJobsAsync("")) +await foreach (BinaryData item in client.GetTrainingJobsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-training-jobs +This sample shows how to call GetTrainingJobsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetTrainingJobsAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +} +]]> - -This sample shows how to call GetTrainingJobs with required parameters and parse the result. + +This sample shows how to call GetTrainingJobs and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetTrainingJobs("")) +foreach (BinaryData item in client.GetTrainingJobs("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-training-jobs +This sample shows how to call GetTrainingJobs with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetTrainingJobs("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +} +]]> - -This sample shows how to call GetSupportedLanguagesAsync with required parameters and parse the result. + +This sample shows how to call GetSupportedLanguagesAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetSupportedLanguagesAsync("")) +await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("languageName").ToString()); - Console.WriteLine(result.GetProperty("languageCode").ToString()); + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-supported-languages +This sample shows how to call GetSupportedLanguagesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); +} +]]> - -This sample shows how to call GetSupportedLanguages with required parameters and parse the result. + +This sample shows how to call GetSupportedLanguages and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetSupportedLanguages("")) +foreach (BinaryData item in client.GetSupportedLanguages("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("languageName").ToString()); - Console.WriteLine(result.GetProperty("languageCode").ToString()); + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-supported-languages +This sample shows how to call GetSupportedLanguages with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetSupportedLanguages("Conversation")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); +} +]]> - + This sample shows how to call GetSupportedPrebuiltEntitiesAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetSupportedPrebuiltEntitiesAsync()) +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } ]]> -This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters, and how to parse the result. +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetSupportedPrebuiltEntitiesAsync("", true)) +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-supported-prebuilt-entities - - +]]> - + This sample shows how to call GetSupportedPrebuiltEntities and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetSupportedPrebuiltEntities()) +foreach (BinaryData item in client.GetSupportedPrebuiltEntities()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } ]]> -This sample shows how to call GetSupportedPrebuiltEntities with all parameters, and how to parse the result. +This sample shows how to call GetSupportedPrebuiltEntities with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetSupportedPrebuiltEntities("", true)) +foreach (BinaryData item in client.GetSupportedPrebuiltEntities(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/get-supported-prebuilt-entities - - +]]> - -This sample shows how to call GetTrainingConfigVersionsAsync with required parameters and parse the result. + +This sample shows how to call GetTrainingConfigVersionsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -await foreach (var item in client.GetTrainingConfigVersionsAsync("")) +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-training-config-versions +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); +} +]]> - -This sample shows how to call GetTrainingConfigVersions with required parameters and parse the result. + +This sample shows how to call GetTrainingConfigVersions and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -foreach (var item in client.GetTrainingConfigVersions("")) +foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/list-training-config-versions +This sample shows how to call GetTrainingConfigVersions with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); +} +]]> - -This sample shows how to call DeleteProjectAsync with required parameters and parse the result. + +This sample shows how to call DeleteProjectAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call DeleteProjectAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -1614,32 +1921,40 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/delete-project - - +]]> - -This sample shows how to call DeleteProject with required parameters and parse the result. + +This sample shows how to call DeleteProject and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var operation = client.DeleteProject(WaitUntil.Completed, ""); +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call DeleteProject with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -1656,44 +1971,37 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/delete-project - - +]]> - -This sample shows how to call ExportProjectAsync with required parameters and parse the result. + +This sample shows how to call ExportProjectAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var operation = await client.ExportProjectAsync(WaitUntil.Completed, ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +Operation operation = await client.ExportProjectAsync(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ExportProjectAsync with all parameters, and how to parse the result. +This sample shows how to call ExportProjectAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var operation = await client.ExportProjectAsync(WaitUntil.Completed, "", "", "", "Utf16CodeUnit", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +Operation operation = await client.ExportProjectAsync(WaitUntil.Completed, "", exportedProjectFormat: "Conversation", assetKind: "", stringIndexType: "Utf16CodeUnit", trainedModelLabel: ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("resultUrl").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -1711,44 +2019,37 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/export - - +]]> - -This sample shows how to call ExportProject with required parameters and parse the result. + +This sample shows how to call ExportProject and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var operation = client.ExportProject(WaitUntil.Completed, ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +Operation operation = client.ExportProject(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ExportProject with all parameters, and how to parse the result. +This sample shows how to call ExportProject with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var operation = client.ExportProject(WaitUntil.Completed, "", "", "", "Utf16CodeUnit", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +Operation operation = client.ExportProject(WaitUntil.Completed, "", exportedProjectFormat: "Conversation", assetKind: "", stringIndexType: "Utf16CodeUnit", trainedModelLabel: ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("resultUrl").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -1766,133 +2067,150 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/export - - +]]> - -This sample shows how to call ImportProjectAsync with required parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new { - projectKind = "Conversation", - projectName = "", - language = "", - }, -}; - -var operation = await client.ImportProjectAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + +This sample shows how to call ImportProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() + { + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", + }, +}); +Operation operation = await client.ImportProjectAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call ImportProjectAsync with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new { - projectKind = "Conversation", - settings = new { - confidenceThreshold = 123.45f, +This sample shows how to call ImportProjectAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() + { + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() + { + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", }, - assets = new { - intents = new[] { - new { - category = "", - } - }, - entities = new[] { - new { - category = "", - compositionSetting = "returnLongestOverlap", - list = new { - sublists = new[] { - new { - listKey = "", - synonyms = new[] { - new { - language = "", - values = new[] { - "" - }, - } - }, - } - }, - }, - prebuilts = new[] { - new { - category = "", - } - }, - regex = new { - expressions = new[] { - new { - regexKey = "", - language = "", - regexPattern = "", - } - }, - }, - requiredComponents = new[] { - "" - }, - } - }, - utterances = new[] { - new { - entities = new[] { - new { - category = "", - offset = 1234, - length = 1234, - } - }, - text = "", - language = "", - intent = "", - dataset = "", - } - }, - projectKind = "Conversation", + ["assets"] = new Dictionary() + { + ["intents"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, + ["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["compositionSetting"] = "returnLongestOverlap", +["list"] = new Dictionary() +{ +["sublists"] = new List() +{ +new Dictionary() +{ +["listKey"] = "", +["synonyms"] = new List() +{ +new Dictionary() +{ +["language"] = "", +["values"] = new List() +{ +"" +}, +} +}, +} +}, +}, +["prebuilts"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, +["regex"] = new Dictionary() +{ +["expressions"] = new List() +{ +new Dictionary() +{ +["regexKey"] = "", +["language"] = "", +["regexPattern"] = "", +} +}, +}, +["requiredComponents"] = new List() +{ +"" +}, +} +}, + ["utterances"] = new List() +{ +new Dictionary() +{ +["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["offset"] = 1234, +["length"] = 1234, +} +}, +["text"] = "", +["language"] = "", +["intent"] = "", +["dataset"] = "", +} +}, + ["projectKind"] = "Conversation", }, -}; - -var operation = await client.ImportProjectAsync(WaitUntil.Completed, "", RequestContent.Create(data), ""); - +}); +Operation operation = await client.ImportProjectAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -1909,133 +2227,150 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/import - - +]]> - -This sample shows how to call ImportProject with required parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new { - projectKind = "Conversation", - projectName = "", - language = "", - }, -}; - -var operation = client.ImportProject(WaitUntil.Completed, "", RequestContent.Create(data)); + +This sample shows how to call ImportProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() + { + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", + }, +}); +Operation operation = client.ImportProject(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call ImportProject with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new { - projectKind = "Conversation", - settings = new { - confidenceThreshold = 123.45f, +This sample shows how to call ImportProject with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() + { + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() + { + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", }, - assets = new { - intents = new[] { - new { - category = "", - } - }, - entities = new[] { - new { - category = "", - compositionSetting = "returnLongestOverlap", - list = new { - sublists = new[] { - new { - listKey = "", - synonyms = new[] { - new { - language = "", - values = new[] { - "" - }, - } - }, - } - }, - }, - prebuilts = new[] { - new { - category = "", - } - }, - regex = new { - expressions = new[] { - new { - regexKey = "", - language = "", - regexPattern = "", - } - }, - }, - requiredComponents = new[] { - "" - }, - } - }, - utterances = new[] { - new { - entities = new[] { - new { - category = "", - offset = 1234, - length = 1234, - } - }, - text = "", - language = "", - intent = "", - dataset = "", - } - }, - projectKind = "Conversation", + ["assets"] = new Dictionary() + { + ["intents"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, + ["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["compositionSetting"] = "returnLongestOverlap", +["list"] = new Dictionary() +{ +["sublists"] = new List() +{ +new Dictionary() +{ +["listKey"] = "", +["synonyms"] = new List() +{ +new Dictionary() +{ +["language"] = "", +["values"] = new List() +{ +"" +}, +} +}, +} +}, +}, +["prebuilts"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, +["regex"] = new Dictionary() +{ +["expressions"] = new List() +{ +new Dictionary() +{ +["regexKey"] = "", +["language"] = "", +["regexPattern"] = "", +} +}, +}, +["requiredComponents"] = new List() +{ +"" +}, +} +}, + ["utterances"] = new List() +{ +new Dictionary() +{ +["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["offset"] = 1234, +["length"] = 1234, +} +}, +["text"] = "", +["language"] = "", +["intent"] = "", +["dataset"] = "", +} +}, + ["projectKind"] = "Conversation", }, -}; - -var operation = client.ImportProject(WaitUntil.Completed, "", RequestContent.Create(data), ""); - +}); +Operation operation = client.ImportProject(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2052,37 +2387,30 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/import - - +]]> - -This sample shows how to call TrainAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call TrainAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - modelLabel = "", - trainingMode = "advanced", -}; - -var operation = await client.TrainAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["modelLabel"] = "", + ["trainingMode"] = "advanced", +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2093,26 +2421,27 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call TrainAsync with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - modelLabel = "", - trainingConfigVersion = "", - trainingMode = "advanced", - evaluationOptions = new { - kind = "percentage", - trainingSplitPercentage = 1234, - testingSplitPercentage = 1234, - }, -}; - -var operation = await client.TrainAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +This sample shows how to call TrainAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["modelLabel"] = "", + ["trainingConfigVersion"] = "", + ["trainingMode"] = "advanced", + ["evaluationOptions"] = new Dictionary() + { + ["kind"] = "percentage", + ["trainingSplitPercentage"] = 1234, + ["testingSplitPercentage"] = 1234, + }, +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2141,37 +2470,30 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/train - - +]]> - -This sample shows how to call Train with required parameters and request content, and how to parse the result. + +This sample shows how to call Train and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - modelLabel = "", - trainingMode = "advanced", -}; - -var operation = client.Train(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["modelLabel"] = "", + ["trainingMode"] = "advanced", +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2182,26 +2504,27 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call Train with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - modelLabel = "", - trainingConfigVersion = "", - trainingMode = "advanced", - evaluationOptions = new { - kind = "percentage", - trainingSplitPercentage = 1234, - testingSplitPercentage = 1234, - }, -}; - -var operation = client.Train(WaitUntil.Completed, "", RequestContent.Create(data)); +This sample shows how to call Train with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["modelLabel"] = "", + ["trainingConfigVersion"] = "", + ["trainingMode"] = "advanced", + ["evaluationOptions"] = new Dictionary() + { + ["kind"] = "percentage", + ["trainingSplitPercentage"] = 1234, + ["testingSplitPercentage"] = 1234, + }, +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2230,37 +2553,50 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/train - - +]]> - -This sample shows how to call SwapDeploymentsAsync with required parameters and request content and parse the result. + +This sample shows how to call SwapDeploymentsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var data = new { - firstDeploymentName = "", - secondDeploymentName = "", -}; +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; -var operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2277,37 +2613,50 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/swap-deployments - - +]]> - -This sample shows how to call SwapDeployments with required parameters and request content and parse the result. + +This sample shows how to call SwapDeployments and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var data = new { - firstDeploymentName = "", - secondDeploymentName = "", -}; +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; -var operation = client.SwapDeployments(WaitUntil.Completed, "", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call SwapDeployments with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2324,36 +2673,29 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/swap-deployments - - +]]> - -This sample shows how to call DeployProjectAsync with required parameters and request content and parse the result. + +This sample shows how to call DeployProjectAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - trainedModelLabel = "", -}; - -var operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["trainedModelLabel"] = "", +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -2362,29 +2704,43 @@ Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); ]]> - - +This sample shows how to call DeployProjectAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/deploy-project +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["trainedModelLabel"] = "", +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; - +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> - -This sample shows how to call DeployProject with required parameters and request content and parse the result. + +This sample shows how to call DeployProject and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var data = new { - trainedModelLabel = "", -}; - -var operation = client.DeployProject(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["trainedModelLabel"] = "", +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -2393,25 +2749,54 @@ Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); ]]> - - +This sample shows how to call DeployProject with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/deploy-project +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["trainedModelLabel"] = "", +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; - +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> - -This sample shows how to call DeleteDeploymentAsync with required parameters and parse the result. + +This sample shows how to call DeleteDeploymentAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +BinaryData responseData = operation.Value; -var operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call DeleteDeploymentAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2428,32 +2813,40 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/delete-deployment - - +]]> - -This sample shows how to call DeleteDeployment with required parameters and parse the result. + +This sample shows how to call DeleteDeployment and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call DeleteDeployment with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2470,72 +2863,82 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/delete-deployment - - +]]> - -This sample shows how to call LoadSnapshotAsync with required parameters. + +This sample shows how to call LoadSnapshotAsync. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/load-snapshot +This sample shows how to call LoadSnapshotAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> - -This sample shows how to call LoadSnapshot with required parameters. + +This sample shows how to call LoadSnapshot. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); - -var operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/load-snapshot +This sample shows how to call LoadSnapshot with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> - -This sample shows how to call CancelTrainingJobAsync with required parameters and parse the result. + +This sample shows how to call CancelTrainingJobAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2564,32 +2967,44 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/cancel-training-job - - +]]> - -This sample shows how to call CancelTrainingJob with required parameters and parse the result. + +This sample shows how to call CancelTrainingJob and parse the result. "); -var endpoint = new Uri(""); -var client = new ConversationAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); -var operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +BinaryData responseData = operation.Value; +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJob with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2618,20 +3033,13 @@ Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetP Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/language/2023-04-01/conversational-analysis-authoring/cancel-training-job - - +]]> \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs index def7c2f6b94c..a719f1780996 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.AI.Language.Conversations; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,30 +23,28 @@ public class Samples_ConversationAnalysisClient [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversation() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - analysisInput = new + ["analysisInput"] = new Dictionary() { - conversationItem = new + ["conversationItem"] = new Dictionary() { - text = "", - id = "", - participantId = "", + ["id"] = "", + ["participantId"] = "", }, }, - parameters = new + ["parameters"] = new Dictionary() { - projectName = "", - deploymentName = "", + ["projectName"] = "", + ["deploymentName"] = "", }, - kind = "Conversation", - }; - - Response response = client.AnalyzeConversation(RequestContent.Create(data)); + ["kind"] = "Conversation", + }); + Response response = client.AnalyzeConversation(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -56,55 +54,53 @@ public void Example_AnalyzeConversation() [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversation_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - analysisInput = new + ["analysisInput"] = new Dictionary() { - conversationItem = new + ["conversationItem"] = new Dictionary() { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", + ["id"] = "", + ["participantId"] = "", + ["language"] = "", + ["modality"] = "transcript", + ["role"] = "agent", }, }, - parameters = new + ["parameters"] = new Dictionary() { - projectName = "", - deploymentName = "", - verbose = true, - isLoggingEnabled = true, - stringIndexType = "Utf16CodeUnit", - directTarget = "", - targetProjectParameters = new + ["projectName"] = "", + ["deploymentName"] = "", + ["verbose"] = true, + ["isLoggingEnabled"] = true, + ["stringIndexType"] = "Utf16CodeUnit", + ["directTarget"] = "", + ["targetProjectParameters"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - query = "", - callingOptions = new + ["query"] = "", + ["callingOptions"] = new Dictionary() { - verbose = true, - log = true, - show_all_intents = true, - timezoneOffset = 123.45f, - spellCheck = true, - bing_spell_check_subscription_key = "", + ["verbose"] = true, + ["log"] = true, + ["show-all-intents"] = true, + ["timezoneOffset"] = 123.45F, + ["spellCheck"] = true, + ["bing-spell-check-subscription-key"] = "", }, - targetProjectKind = "Luis", - apiVersion = "", + ["targetProjectKind"] = "Luis", + ["apiVersion"] = "", }, }, }, - kind = "Conversation", - }; - - Response response = client.AnalyzeConversation(RequestContent.Create(data)); + ["kind"] = "Conversation", + }); + Response response = client.AnalyzeConversation(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -114,30 +110,28 @@ public void Example_AnalyzeConversation_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeConversation_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - analysisInput = new + ["analysisInput"] = new Dictionary() { - conversationItem = new + ["conversationItem"] = new Dictionary() { - text = "", - id = "", - participantId = "", + ["id"] = "", + ["participantId"] = "", }, }, - parameters = new + ["parameters"] = new Dictionary() { - projectName = "", - deploymentName = "", + ["projectName"] = "", + ["deploymentName"] = "", }, - kind = "Conversation", - }; - - Response response = await client.AnalyzeConversationAsync(RequestContent.Create(data)); + ["kind"] = "Conversation", + }); + Response response = await client.AnalyzeConversationAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -147,55 +141,53 @@ public async Task Example_AnalyzeConversation_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeConversation_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - analysisInput = new + ["analysisInput"] = new Dictionary() { - conversationItem = new + ["conversationItem"] = new Dictionary() { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", + ["id"] = "", + ["participantId"] = "", + ["language"] = "", + ["modality"] = "transcript", + ["role"] = "agent", }, }, - parameters = new + ["parameters"] = new Dictionary() { - projectName = "", - deploymentName = "", - verbose = true, - isLoggingEnabled = true, - stringIndexType = "Utf16CodeUnit", - directTarget = "", - targetProjectParameters = new + ["projectName"] = "", + ["deploymentName"] = "", + ["verbose"] = true, + ["isLoggingEnabled"] = true, + ["stringIndexType"] = "Utf16CodeUnit", + ["directTarget"] = "", + ["targetProjectParameters"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - query = "", - callingOptions = new + ["query"] = "", + ["callingOptions"] = new Dictionary() { - verbose = true, - log = true, - show_all_intents = true, - timezoneOffset = 123.45f, - spellCheck = true, - bing_spell_check_subscription_key = "", + ["verbose"] = true, + ["log"] = true, + ["show-all-intents"] = true, + ["timezoneOffset"] = 123.45F, + ["spellCheck"] = true, + ["bing-spell-check-subscription-key"] = "", }, - targetProjectKind = "Luis", - apiVersion = "", + ["targetProjectKind"] = "Luis", + ["apiVersion"] = "", }, }, }, - kind = "Conversation", - }; - - Response response = await client.AnalyzeConversationAsync(RequestContent.Create(data)); + ["kind"] = "Conversation", + }); + Response response = await client.AnalyzeConversationAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -205,11 +197,11 @@ public async Task Example_AnalyzeConversation_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAnalyzeConversationJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - Response response = client.GetAnalyzeConversationJobStatus(Guid.NewGuid()); + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -222,11 +214,11 @@ public void Example_GetAnalyzeConversationJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetAnalyzeConversationJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - Response response = client.GetAnalyzeConversationJobStatus(Guid.NewGuid(), true); + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), showStats: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); @@ -243,11 +235,11 @@ public void Example_GetAnalyzeConversationJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } @@ -256,11 +248,11 @@ public void Example_GetAnalyzeConversationJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAnalyzeConversationJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.NewGuid()); + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -273,11 +265,11 @@ public async Task Example_GetAnalyzeConversationJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAnalyzeConversationJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.NewGuid(), true); + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), showStats: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); @@ -294,11 +286,11 @@ public async Task Example_GetAnalyzeConversationJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } @@ -307,39 +299,44 @@ public async Task Example_GetAnalyzeConversationJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversations() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - analysisInput = new + ["analysisInput"] = new Dictionary() { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - } - }, - id = "", - language = "", - modality = "text", - } - }, + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +} +}, }, - tasks = new[] { - new { - kind = "ConversationalSummarizationTask", - } - }, - }; - - var operation = client.AnalyzeConversations(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["kind"] = "ConversationalSummarizationTask", +} +}, + }); + Operation operation = client.AnalyzeConversations(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -351,52 +348,59 @@ public void Example_AnalyzeConversations() [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversations_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - displayName = "", - analysisInput = new + ["displayName"] = "", + ["analysisInput"] = new Dictionary() { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", - } - }, - id = "", - language = "", - modality = "text", - domain = "finance", - } - }, - }, - tasks = new[] { - new { - parameters = new { - summaryAspects = new[] { - "issue" + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +["language"] = "", +["modality"] = "transcript", +["role"] = "agent", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +["domain"] = "finance", +} +}, }, - modelVersion = "", - loggingOptOut = true, - }, - kind = "ConversationalSummarizationTask", - taskName = "", - } - }, - }; - - var operation = client.AnalyzeConversations(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["summaryAspects"] = new List() +{ +"issue" +}, +["modelVersion"] = "", +["loggingOptOut"] = true, +}, +["kind"] = "ConversationalSummarizationTask", +["taskName"] = "", +} +}, + }); + Operation operation = client.AnalyzeConversations(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -412,11 +416,11 @@ public void Example_AnalyzeConversations_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } @@ -425,39 +429,44 @@ public void Example_AnalyzeConversations_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeConversations_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - analysisInput = new + ["analysisInput"] = new Dictionary() { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - } - }, - id = "", - language = "", - modality = "text", - } - }, + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +} +}, }, - tasks = new[] { - new { - kind = "ConversationalSummarizationTask", - } - }, - }; - - var operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["kind"] = "ConversationalSummarizationTask", +} +}, + }); + Operation operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -469,52 +478,59 @@ public async Task Example_AnalyzeConversations_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeConversations_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - displayName = "", - analysisInput = new + ["displayName"] = "", + ["analysisInput"] = new Dictionary() { - conversations = new[] { - new { - conversationItems = new[] { - new { - text = "", - id = "", - participantId = "", - language = "", - modality = "transcript", - role = "agent", - } - }, - id = "", - language = "", - modality = "text", - domain = "finance", - } - }, - }, - tasks = new[] { - new { - parameters = new { - summaryAspects = new[] { - "issue" + ["conversations"] = new List() +{ +new Dictionary() +{ +["conversationItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +["id"] = "", +["participantId"] = "", +["language"] = "", +["modality"] = "transcript", +["role"] = "agent", +} +}, +["id"] = "", +["language"] = "", +["modality"] = "text", +["domain"] = "finance", +} +}, }, - modelVersion = "", - loggingOptOut = true, - }, - kind = "ConversationalSummarizationTask", - taskName = "", - } - }, - }; - - var operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, RequestContent.Create(data)); - + ["tasks"] = new List() +{ +new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["summaryAspects"] = new List() +{ +"issue" +}, +["modelVersion"] = "", +["loggingOptOut"] = true, +}, +["kind"] = "ConversationalSummarizationTask", +["taskName"] = "", +} +}, + }); + Operation operation = await client.AnalyzeConversationsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -530,11 +546,11 @@ public async Task Example_AnalyzeConversations_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("nextLink").ToString()); } @@ -543,52 +559,44 @@ public async Task Example_AnalyzeConversations_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CancelAnalyzeConversations() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var operation = client.CancelAnalyzeConversations(WaitUntil.Completed, Guid.NewGuid()); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.CancelAnalyzeConversations(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CancelAnalyzeConversations_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); - - var operation = client.CancelAnalyzeConversations(WaitUntil.Completed, Guid.NewGuid()); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.CancelAnalyzeConversations(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CancelAnalyzeConversations_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - var operation = await client.CancelAnalyzeConversationsAsync(WaitUntil.Completed, Guid.NewGuid()); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.CancelAnalyzeConversationsAsync(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CancelAnalyzeConversations_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAnalysisClient(endpoint, credential); - - var operation = await client.CancelAnalyzeConversationsAsync(WaitUntil.Completed, Guid.NewGuid()); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.CancelAnalyzeConversationsAsync(WaitUntil.Completed, Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAuthoringClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAuthoringClient.cs index 2ccf73453910..469ed02dfb53 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAuthoringClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAuthoringClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.AI.Language.Conversations.Authoring; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,18 +23,17 @@ public class Samples_ConversationAuthoringClient [Ignore("Only validating compilation of examples")] public void Example_CreateProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectKind = "Conversation", - projectName = "", - language = "", - }; - - Response response = client.CreateProject("", RequestContent.Create(data)); + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", + }); + Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -48,24 +47,23 @@ public void Example_CreateProject() [Ignore("Only validating compilation of examples")] public void Example_CreateProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectKind = "Conversation", - settings = new + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() { - confidenceThreshold = 123.45f, + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", - }; - - Response response = client.CreateProject("", RequestContent.Create(data)); + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", + }); + Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -84,18 +82,17 @@ public void Example_CreateProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectKind = "Conversation", - projectName = "", - language = "", - }; - - Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", + }); + Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -109,24 +106,23 @@ public async Task Example_CreateProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectKind = "Conversation", - settings = new + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() { - confidenceThreshold = 123.45f, + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", - }; - - Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", + }); + Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -145,9 +141,9 @@ public async Task Example_CreateProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetProject(""); @@ -163,9 +159,9 @@ public void Example_GetProject() [Ignore("Only validating compilation of examples")] public void Example_GetProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetProject(""); @@ -186,9 +182,9 @@ public void Example_GetProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetProjectAsync(""); @@ -204,9 +200,9 @@ public async Task Example_GetProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetProjectAsync(""); @@ -227,9 +223,9 @@ public async Task Example_GetProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeployment() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetDeployment("", ""); @@ -246,9 +242,9 @@ public void Example_GetDeployment() [Ignore("Only validating compilation of examples")] public void Example_GetDeployment_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetDeployment("", ""); @@ -265,9 +261,9 @@ public void Example_GetDeployment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployment_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetDeploymentAsync("", ""); @@ -284,9 +280,9 @@ public async Task Example_GetDeployment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployment_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetDeploymentAsync("", ""); @@ -303,9 +299,9 @@ public async Task Example_GetDeployment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetDeploymentJobStatus("", "", ""); @@ -320,9 +316,9 @@ public void Example_GetDeploymentJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetDeploymentJobStatus("", "", ""); @@ -342,11 +338,11 @@ public void Example_GetDeploymentJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -354,9 +350,9 @@ public void Example_GetDeploymentJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetDeploymentJobStatusAsync("", "", ""); @@ -371,9 +367,9 @@ public async Task Example_GetDeploymentJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetDeploymentJobStatusAsync("", "", ""); @@ -393,11 +389,11 @@ public async Task Example_GetDeploymentJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -405,9 +401,9 @@ public async Task Example_GetDeploymentJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSwapDeploymentsJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetSwapDeploymentsJobStatus("", ""); @@ -422,9 +418,9 @@ public void Example_GetSwapDeploymentsJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetSwapDeploymentsJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetSwapDeploymentsJobStatus("", ""); @@ -444,11 +440,11 @@ public void Example_GetSwapDeploymentsJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -456,9 +452,9 @@ public void Example_GetSwapDeploymentsJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSwapDeploymentsJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetSwapDeploymentsJobStatusAsync("", ""); @@ -473,9 +469,9 @@ public async Task Example_GetSwapDeploymentsJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSwapDeploymentsJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetSwapDeploymentsJobStatusAsync("", ""); @@ -495,11 +491,11 @@ public async Task Example_GetSwapDeploymentsJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -507,9 +503,9 @@ public async Task Example_GetSwapDeploymentsJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetExportProjectJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetExportProjectJobStatus("", ""); @@ -521,9 +517,9 @@ public void Example_GetExportProjectJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetExportProjectJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetExportProjectJobStatus("", ""); @@ -544,11 +540,11 @@ public void Example_GetExportProjectJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -556,9 +552,9 @@ public void Example_GetExportProjectJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetExportProjectJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetExportProjectJobStatusAsync("", ""); @@ -570,9 +566,9 @@ public async Task Example_GetExportProjectJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetExportProjectJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetExportProjectJobStatusAsync("", ""); @@ -593,11 +589,11 @@ public async Task Example_GetExportProjectJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -605,9 +601,9 @@ public async Task Example_GetExportProjectJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetImportProjectJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetImportProjectJobStatus("", ""); @@ -622,9 +618,9 @@ public void Example_GetImportProjectJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetImportProjectJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetImportProjectJobStatus("", ""); @@ -644,11 +640,11 @@ public void Example_GetImportProjectJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -656,9 +652,9 @@ public void Example_GetImportProjectJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetImportProjectJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetImportProjectJobStatusAsync("", ""); @@ -673,9 +669,9 @@ public async Task Example_GetImportProjectJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetImportProjectJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetImportProjectJobStatusAsync("", ""); @@ -695,11 +691,11 @@ public async Task Example_GetImportProjectJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -707,9 +703,9 @@ public async Task Example_GetImportProjectJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTrainedModel() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetTrainedModel("", ""); @@ -727,9 +723,9 @@ public void Example_GetTrainedModel() [Ignore("Only validating compilation of examples")] public void Example_GetTrainedModel_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetTrainedModel("", ""); @@ -747,9 +743,9 @@ public void Example_GetTrainedModel_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainedModel_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetTrainedModelAsync("", ""); @@ -767,9 +763,9 @@ public async Task Example_GetTrainedModel_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainedModel_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetTrainedModelAsync("", ""); @@ -787,9 +783,9 @@ public async Task Example_GetTrainedModel_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteTrainedModel() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.DeleteTrainedModel("", ""); Console.WriteLine(response.Status); @@ -799,9 +795,9 @@ public void Example_DeleteTrainedModel() [Ignore("Only validating compilation of examples")] public void Example_DeleteTrainedModel_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.DeleteTrainedModel("", ""); Console.WriteLine(response.Status); @@ -811,9 +807,9 @@ public void Example_DeleteTrainedModel_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTrainedModel_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.DeleteTrainedModelAsync("", ""); Console.WriteLine(response.Status); @@ -823,9 +819,9 @@ public async Task Example_DeleteTrainedModel_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTrainedModel_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.DeleteTrainedModelAsync("", ""); Console.WriteLine(response.Status); @@ -835,37 +831,37 @@ public async Task Example_DeleteTrainedModel_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetModelEvaluationSummary() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetModelEvaluationSummary("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); @@ -878,37 +874,37 @@ public void Example_GetModelEvaluationSummary() [Ignore("Only validating compilation of examples")] public void Example_GetModelEvaluationSummary_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetModelEvaluationSummary("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); @@ -924,37 +920,37 @@ public void Example_GetModelEvaluationSummary_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetModelEvaluationSummary_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetModelEvaluationSummaryAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); @@ -967,37 +963,37 @@ public async Task Example_GetModelEvaluationSummary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetModelEvaluationSummary_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetModelEvaluationSummaryAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); - Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("normalizedValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").GetProperty("").GetProperty("").GetProperty("rawValue").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); @@ -1013,9 +1009,9 @@ public async Task Example_GetModelEvaluationSummary_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetLoadSnapshotJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetLoadSnapshotJobStatus("", "", ""); @@ -1030,9 +1026,9 @@ public void Example_GetLoadSnapshotJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetLoadSnapshotJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetLoadSnapshotJobStatus("", "", ""); @@ -1052,11 +1048,11 @@ public void Example_GetLoadSnapshotJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -1064,9 +1060,9 @@ public void Example_GetLoadSnapshotJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLoadSnapshotJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetLoadSnapshotJobStatusAsync("", "", ""); @@ -1081,9 +1077,9 @@ public async Task Example_GetLoadSnapshotJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLoadSnapshotJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetLoadSnapshotJobStatusAsync("", "", ""); @@ -1103,11 +1099,11 @@ public async Task Example_GetLoadSnapshotJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -1115,9 +1111,9 @@ public async Task Example_GetLoadSnapshotJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTrainingJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetTrainingJobStatus("", ""); @@ -1136,9 +1132,9 @@ public void Example_GetTrainingJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetTrainingJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetTrainingJobStatus("", ""); @@ -1170,11 +1166,11 @@ public void Example_GetTrainingJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -1182,9 +1178,9 @@ public void Example_GetTrainingJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainingJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetTrainingJobStatusAsync("", ""); @@ -1203,9 +1199,9 @@ public async Task Example_GetTrainingJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainingJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetTrainingJobStatusAsync("", ""); @@ -1237,11 +1233,11 @@ public async Task Example_GetTrainingJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -1249,9 +1245,9 @@ public async Task Example_GetTrainingJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetProjectDeletionJobStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetProjectDeletionJobStatus(""); @@ -1266,9 +1262,9 @@ public void Example_GetProjectDeletionJobStatus() [Ignore("Only validating compilation of examples")] public void Example_GetProjectDeletionJobStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = client.GetProjectDeletionJobStatus(""); @@ -1288,11 +1284,11 @@ public void Example_GetProjectDeletionJobStatus_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -1300,9 +1296,9 @@ public void Example_GetProjectDeletionJobStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjectDeletionJobStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetProjectDeletionJobStatusAsync(""); @@ -1317,9 +1313,9 @@ public async Task Example_GetProjectDeletionJobStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjectDeletionJobStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); Response response = await client.GetProjectDeletionJobStatusAsync(""); @@ -1339,11 +1335,11 @@ public async Task Example_GetProjectDeletionJobStatus_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -1351,18 +1347,18 @@ public async Task Example_GetProjectDeletionJobStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetProjects() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetProjects()) + foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("projectKind").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); } } @@ -1370,23 +1366,23 @@ public void Example_GetProjects() [Ignore("Only validating compilation of examples")] public void Example_GetProjects_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetProjects()) + foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("projectKind").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("multilingual").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("multilingual").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); } } @@ -1394,18 +1390,18 @@ public void Example_GetProjects_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjects_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetProjectsAsync()) + await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("projectKind").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); } } @@ -1413,23 +1409,23 @@ public async Task Example_GetProjects_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjects_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetProjectsAsync()) + await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("projectKind").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("multilingual").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectKind").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("multilingual").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); } } @@ -1437,19 +1433,19 @@ public async Task Example_GetProjects_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeployments() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetDeployments("")) + foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); } } @@ -1457,19 +1453,19 @@ public void Example_GetDeployments() [Ignore("Only validating compilation of examples")] public void Example_GetDeployments_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetDeployments("")) + foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); } } @@ -1477,19 +1473,19 @@ public void Example_GetDeployments_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployments_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetDeploymentsAsync("")) + await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); } } @@ -1497,19 +1493,19 @@ public async Task Example_GetDeployments_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployments_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetDeploymentsAsync("")) + await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); - Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); } } @@ -1517,20 +1513,20 @@ public async Task Example_GetDeployments_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTrainedModels() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetTrainedModels("")) + foreach (BinaryData item in client.GetTrainedModels("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("label").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); } } @@ -1538,20 +1534,20 @@ public void Example_GetTrainedModels() [Ignore("Only validating compilation of examples")] public void Example_GetTrainedModels_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetTrainedModels("")) + foreach (BinaryData item in client.GetTrainedModels("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("label").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); } } @@ -1559,20 +1555,20 @@ public void Example_GetTrainedModels_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainedModels_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetTrainedModelsAsync("")) + await foreach (BinaryData item in client.GetTrainedModelsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("label").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); } } @@ -1580,20 +1576,20 @@ public async Task Example_GetTrainedModels_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainedModels_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetTrainedModelsAsync("")) + await foreach (BinaryData item in client.GetTrainedModelsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("label").ToString()); - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); - Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + Console.WriteLine(result[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("modelId").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("hasSnapshot").ToString()); } } @@ -1601,23 +1597,23 @@ public async Task Example_GetTrainedModels_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetModelEvaluationResults() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetModelEvaluationResults("", "")) + foreach (BinaryData item in client.GetModelEvaluationResults("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } } @@ -1625,23 +1621,23 @@ public void Example_GetModelEvaluationResults() [Ignore("Only validating compilation of examples")] public void Example_GetModelEvaluationResults_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) + foreach (BinaryData item in client.GetModelEvaluationResults("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } } @@ -1649,23 +1645,23 @@ public void Example_GetModelEvaluationResults_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetModelEvaluationResults_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetModelEvaluationResultsAsync("", "")) + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } } @@ -1673,23 +1669,23 @@ public async Task Example_GetModelEvaluationResults_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetModelEvaluationResults_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", stringIndexType: "Utf16CodeUnit")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("text").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); - Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); - Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result[0].GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result[0].GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); } } @@ -1697,21 +1693,21 @@ public async Task Example_GetModelEvaluationResults_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTrainingJobs() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetTrainingJobs("")) + foreach (BinaryData item in client.GetTrainingJobs("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } } @@ -1719,46 +1715,46 @@ public void Example_GetTrainingJobs() [Ignore("Only validating compilation of examples")] public void Example_GetTrainingJobs_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetTrainingJobs("")) + foreach (BinaryData item in client.GetTrainingJobs("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } } @@ -1766,21 +1762,21 @@ public void Example_GetTrainingJobs_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainingJobs_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetTrainingJobsAsync("")) + await foreach (BinaryData item in client.GetTrainingJobsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } } @@ -1788,46 +1784,46 @@ public async Task Example_GetTrainingJobs_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainingJobs_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetTrainingJobsAsync("")) + await foreach (BinaryData item in client.GetTrainingJobsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("jobId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } } @@ -1835,15 +1831,15 @@ public async Task Example_GetTrainingJobs_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSupportedLanguages() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetSupportedLanguages("")) + foreach (BinaryData item in client.GetSupportedLanguages("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("languageName").ToString()); - Console.WriteLine(result.GetProperty("languageCode").ToString()); + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); } } @@ -1851,15 +1847,15 @@ public void Example_GetSupportedLanguages() [Ignore("Only validating compilation of examples")] public void Example_GetSupportedLanguages_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetSupportedLanguages("")) + foreach (BinaryData item in client.GetSupportedLanguages("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("languageName").ToString()); - Console.WriteLine(result.GetProperty("languageCode").ToString()); + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); } } @@ -1867,15 +1863,15 @@ public void Example_GetSupportedLanguages_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSupportedLanguages_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSupportedLanguagesAsync("")) + await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("languageName").ToString()); - Console.WriteLine(result.GetProperty("languageCode").ToString()); + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); } } @@ -1883,15 +1879,15 @@ public async Task Example_GetSupportedLanguages_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSupportedLanguages_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSupportedLanguagesAsync("")) + await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("languageName").ToString()); - Console.WriteLine(result.GetProperty("languageCode").ToString()); + Console.WriteLine(result[0].GetProperty("languageName").ToString()); + Console.WriteLine(result[0].GetProperty("languageCode").ToString()); } } @@ -1899,16 +1895,16 @@ public async Task Example_GetSupportedLanguages_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSupportedPrebuiltEntities() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetSupportedPrebuiltEntities()) + foreach (BinaryData item in client.GetSupportedPrebuiltEntities()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } } @@ -1916,16 +1912,16 @@ public void Example_GetSupportedPrebuiltEntities() [Ignore("Only validating compilation of examples")] public void Example_GetSupportedPrebuiltEntities_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetSupportedPrebuiltEntities("", true)) + foreach (BinaryData item in client.GetSupportedPrebuiltEntities(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } } @@ -1933,16 +1929,16 @@ public void Example_GetSupportedPrebuiltEntities_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSupportedPrebuiltEntities_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSupportedPrebuiltEntitiesAsync()) + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } } @@ -1950,16 +1946,16 @@ public async Task Example_GetSupportedPrebuiltEntities_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSupportedPrebuiltEntities_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSupportedPrebuiltEntitiesAsync("", true)) + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: true)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("category").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("examples").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examples").ToString()); } } @@ -1967,15 +1963,15 @@ public async Task Example_GetSupportedPrebuiltEntities_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTrainingConfigVersions() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetTrainingConfigVersions("")) + foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); } } @@ -1983,15 +1979,15 @@ public void Example_GetTrainingConfigVersions() [Ignore("Only validating compilation of examples")] public void Example_GetTrainingConfigVersions_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - foreach (var item in client.GetTrainingConfigVersions("")) + foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); } } @@ -1999,15 +1995,15 @@ public void Example_GetTrainingConfigVersions_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainingConfigVersions_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetTrainingConfigVersionsAsync("")) + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); } } @@ -2015,15 +2011,15 @@ public async Task Example_GetTrainingConfigVersions_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTrainingConfigVersions_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - await foreach (var item in client.GetTrainingConfigVersionsAsync("")) + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); - Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result[0].GetProperty("modelExpirationDate").ToString()); } } @@ -2031,13 +2027,13 @@ public async Task Example_GetTrainingConfigVersions_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.DeleteProject(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2049,13 +2045,13 @@ public void Example_DeleteProject() [Ignore("Only validating compilation of examples")] public void Example_DeleteProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.DeleteProject(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2072,11 +2068,11 @@ public void Example_DeleteProject_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2084,13 +2080,13 @@ public void Example_DeleteProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2102,13 +2098,13 @@ public async Task Example_DeleteProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2125,11 +2121,11 @@ public async Task Example_DeleteProject_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2137,13 +2133,13 @@ public async Task Example_DeleteProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_ExportProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.ExportProject(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.ExportProject(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -2152,13 +2148,13 @@ public void Example_ExportProject() [Ignore("Only validating compilation of examples")] public void Example_ExportProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.ExportProject(WaitUntil.Completed, "", "", "", "Utf16CodeUnit", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.ExportProject(WaitUntil.Completed, "", exportedProjectFormat: "Conversation", assetKind: "", stringIndexType: "Utf16CodeUnit", trainedModelLabel: ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("resultUrl").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -2176,11 +2172,11 @@ public void Example_ExportProject_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2188,13 +2184,13 @@ public void Example_ExportProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_ExportProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.ExportProjectAsync(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.ExportProjectAsync(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -2203,13 +2199,13 @@ public async Task Example_ExportProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_ExportProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.ExportProjectAsync(WaitUntil.Completed, "", "", "", "Utf16CodeUnit", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.ExportProjectAsync(WaitUntil.Completed, "", exportedProjectFormat: "Conversation", assetKind: "", stringIndexType: "Utf16CodeUnit", trainedModelLabel: ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("resultUrl").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -2227,11 +2223,11 @@ public async Task Example_ExportProject_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2239,25 +2235,24 @@ public async Task Example_ExportProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_ImportProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() { - projectKind = "Conversation", - projectName = "", - language = "", + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", }, - }; - - var operation = client.ImportProject(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.ImportProject(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2269,93 +2264,112 @@ public void Example_ImportProject() [Ignore("Only validating compilation of examples")] public void Example_ImportProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() { - projectKind = "Conversation", - settings = new + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() { - confidenceThreshold = 123.45f, + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", }, - assets = new + ["assets"] = new Dictionary() { - intents = new[] { - new { - category = "", - } - }, - entities = new[] { - new { - category = "", - compositionSetting = "returnLongestOverlap", - list = new { - sublists = new[] { - new { - listKey = "", - synonyms = new[] { - new { - language = "", - values = new[] { - "" - }, - } - }, - } - }, - }, - prebuilts = new[] { - new { - category = "", - } - }, - regex = new { - expressions = new[] { - new { - regexKey = "", - language = "", - regexPattern = "", - } - }, - }, - requiredComponents = new[] { - "" - }, - } - }, - utterances = new[] { - new { - entities = new[] { - new { - category = "", - offset = 1234, - length = 1234, - } - }, - text = "", - language = "", - intent = "", - dataset = "", - } - }, - projectKind = "Conversation", + ["intents"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, + ["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["compositionSetting"] = "returnLongestOverlap", +["list"] = new Dictionary() +{ +["sublists"] = new List() +{ +new Dictionary() +{ +["listKey"] = "", +["synonyms"] = new List() +{ +new Dictionary() +{ +["language"] = "", +["values"] = new List() +{ +"" +}, +} +}, +} +}, +}, +["prebuilts"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, +["regex"] = new Dictionary() +{ +["expressions"] = new List() +{ +new Dictionary() +{ +["regexKey"] = "", +["language"] = "", +["regexPattern"] = "", +} +}, +}, +["requiredComponents"] = new List() +{ +"" +}, +} +}, + ["utterances"] = new List() +{ +new Dictionary() +{ +["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["offset"] = 1234, +["length"] = 1234, +} +}, +["text"] = "", +["language"] = "", +["intent"] = "", +["dataset"] = "", +} +}, + ["projectKind"] = "Conversation", }, - }; - - var operation = client.ImportProject(WaitUntil.Completed, "", RequestContent.Create(data), ""); - + }); + Operation operation = client.ImportProject(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2372,11 +2386,11 @@ public void Example_ImportProject_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2384,25 +2398,24 @@ public void Example_ImportProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_ImportProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() { - projectKind = "Conversation", - projectName = "", - language = "", + ["projectKind"] = "Conversation", + ["projectName"] = "", + ["language"] = "", }, - }; - - var operation = await client.ImportProjectAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.ImportProjectAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2414,93 +2427,112 @@ public async Task Example_ImportProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_ImportProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - projectFileVersion = "", - stringIndexType = "Utf16CodeUnit", - metadata = new + ["projectFileVersion"] = "", + ["stringIndexType"] = "Utf16CodeUnit", + ["metadata"] = new Dictionary() { - projectKind = "Conversation", - settings = new + ["projectKind"] = "Conversation", + ["settings"] = new Dictionary() { - confidenceThreshold = 123.45f, + ["confidenceThreshold"] = 123.45F, }, - projectName = "", - multilingual = true, - description = "", - language = "", + ["projectName"] = "", + ["multilingual"] = true, + ["description"] = "", + ["language"] = "", }, - assets = new + ["assets"] = new Dictionary() { - intents = new[] { - new { - category = "", - } - }, - entities = new[] { - new { - category = "", - compositionSetting = "returnLongestOverlap", - list = new { - sublists = new[] { - new { - listKey = "", - synonyms = new[] { - new { - language = "", - values = new[] { - "" - }, - } - }, - } - }, - }, - prebuilts = new[] { - new { - category = "", - } - }, - regex = new { - expressions = new[] { - new { - regexKey = "", - language = "", - regexPattern = "", - } - }, - }, - requiredComponents = new[] { - "" - }, - } - }, - utterances = new[] { - new { - entities = new[] { - new { - category = "", - offset = 1234, - length = 1234, - } - }, - text = "", - language = "", - intent = "", - dataset = "", - } - }, - projectKind = "Conversation", + ["intents"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, + ["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["compositionSetting"] = "returnLongestOverlap", +["list"] = new Dictionary() +{ +["sublists"] = new List() +{ +new Dictionary() +{ +["listKey"] = "", +["synonyms"] = new List() +{ +new Dictionary() +{ +["language"] = "", +["values"] = new List() +{ +"" +}, +} +}, +} +}, +}, +["prebuilts"] = new List() +{ +new Dictionary() +{ +["category"] = "", +} +}, +["regex"] = new Dictionary() +{ +["expressions"] = new List() +{ +new Dictionary() +{ +["regexKey"] = "", +["language"] = "", +["regexPattern"] = "", +} +}, +}, +["requiredComponents"] = new List() +{ +"" +}, +} +}, + ["utterances"] = new List() +{ +new Dictionary() +{ +["entities"] = new List() +{ +new Dictionary() +{ +["category"] = "", +["offset"] = 1234, +["length"] = 1234, +} +}, +["text"] = "", +["language"] = "", +["intent"] = "", +["dataset"] = "", +} +}, + ["projectKind"] = "Conversation", }, - }; - - var operation = await client.ImportProjectAsync(WaitUntil.Completed, "", RequestContent.Create(data), ""); - + }); + Operation operation = await client.ImportProjectAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2517,11 +2549,11 @@ public async Task Example_ImportProject_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2529,19 +2561,18 @@ public async Task Example_ImportProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Train() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - modelLabel = "", - trainingMode = "advanced", - }; - - var operation = client.Train(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["modelLabel"] = "", + ["trainingMode"] = "advanced", + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2557,26 +2588,25 @@ public void Example_Train() [Ignore("Only validating compilation of examples")] public void Example_Train_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - modelLabel = "", - trainingConfigVersion = "", - trainingMode = "advanced", - evaluationOptions = new + ["modelLabel"] = "", + ["trainingConfigVersion"] = "", + ["trainingMode"] = "advanced", + ["evaluationOptions"] = new Dictionary() { - kind = "percentage", - trainingSplitPercentage = 1234, - testingSplitPercentage = 1234, + ["kind"] = "percentage", + ["trainingSplitPercentage"] = 1234, + ["testingSplitPercentage"] = 1234, }, - }; - - var operation = client.Train(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2605,11 +2635,11 @@ public void Example_Train_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2617,19 +2647,18 @@ public void Example_Train_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Train_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - modelLabel = "", - trainingMode = "advanced", - }; - - var operation = await client.TrainAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["modelLabel"] = "", + ["trainingMode"] = "advanced", + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2645,26 +2674,25 @@ public async Task Example_Train_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Train_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - modelLabel = "", - trainingConfigVersion = "", - trainingMode = "advanced", - evaluationOptions = new + ["modelLabel"] = "", + ["trainingConfigVersion"] = "", + ["trainingMode"] = "advanced", + ["evaluationOptions"] = new Dictionary() { - kind = "percentage", - trainingSplitPercentage = 1234, - testingSplitPercentage = 1234, + ["kind"] = "percentage", + ["trainingSplitPercentage"] = 1234, + ["testingSplitPercentage"] = 1234, }, - }; - - var operation = await client.TrainAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -2693,11 +2721,11 @@ public async Task Example_Train_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2705,19 +2733,18 @@ public async Task Example_Train_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_SwapDeployments() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - firstDeploymentName = "", - secondDeploymentName = "", - }; - - var operation = client.SwapDeployments(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2729,19 +2756,18 @@ public void Example_SwapDeployments() [Ignore("Only validating compilation of examples")] public void Example_SwapDeployments_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - firstDeploymentName = "", - secondDeploymentName = "", - }; - - var operation = client.SwapDeployments(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2758,11 +2784,11 @@ public void Example_SwapDeployments_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2770,19 +2796,18 @@ public void Example_SwapDeployments_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_SwapDeployments_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - firstDeploymentName = "", - secondDeploymentName = "", - }; - - var operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2794,19 +2819,18 @@ public async Task Example_SwapDeployments_Async() [Ignore("Only validating compilation of examples")] public async Task Example_SwapDeployments_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - firstDeploymentName = "", - secondDeploymentName = "", - }; - - var operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", RequestContent.Create(data)); - + ["firstDeploymentName"] = "", + ["secondDeploymentName"] = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2823,11 +2847,11 @@ public async Task Example_SwapDeployments_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2835,18 +2859,17 @@ public async Task Example_SwapDeployments_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeployProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - trainedModelLabel = "", - }; - - var operation = client.DeployProject(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["trainedModelLabel"] = "", + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -2860,18 +2883,17 @@ public void Example_DeployProject() [Ignore("Only validating compilation of examples")] public void Example_DeployProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - trainedModelLabel = "", - }; - - var operation = client.DeployProject(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["trainedModelLabel"] = "", + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -2885,18 +2907,17 @@ public void Example_DeployProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeployProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - trainedModelLabel = "", - }; - - var operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["trainedModelLabel"] = "", + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -2910,18 +2931,17 @@ public async Task Example_DeployProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeployProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - trainedModelLabel = "", - }; - - var operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["trainedModelLabel"] = "", + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -2935,13 +2955,13 @@ public async Task Example_DeployProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeployment() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2953,13 +2973,13 @@ public void Example_DeleteDeployment() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeployment_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2976,11 +2996,11 @@ public void Example_DeleteDeployment_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -2988,13 +3008,13 @@ public void Example_DeleteDeployment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeployment_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -3006,13 +3026,13 @@ public async Task Example_DeleteDeployment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeployment_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -3029,11 +3049,11 @@ public async Task Example_DeleteDeployment_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -3041,65 +3061,57 @@ public async Task Example_DeleteDeployment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_LoadSnapshot() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_LoadSnapshot_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_LoadSnapshot_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - var operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_LoadSnapshot_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CancelTrainingJob() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -3115,13 +3127,13 @@ public void Example_CancelTrainingJob() [Ignore("Only validating compilation of examples")] public void Example_CancelTrainingJob_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -3150,11 +3162,11 @@ public void Example_CancelTrainingJob_AllParameters() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } @@ -3162,13 +3174,13 @@ public void Example_CancelTrainingJob_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CancelTrainingJob_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -3184,13 +3196,13 @@ public async Task Example_CancelTrainingJob_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CancelTrainingJob_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ConversationAuthoringClient(endpoint, credential); - - var operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringClient client = new ConversationAuthoringClient(endpoint, credential); + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); @@ -3219,11 +3231,11 @@ public async Task Example_CancelTrainingJob_AllParameters_Async() Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Docs/QuestionAnsweringAuthoringClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Docs/QuestionAnsweringAuthoringClient.xml index 727b8b5fc973..38db2dd1d92f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Docs/QuestionAnsweringAuthoringClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Docs/QuestionAnsweringAuthoringClient.xml @@ -2,12 +2,23 @@ - -This sample shows how to call GetProjectDetailsAsync with required parameters and parse the result. + +This sample shows how to call GetProjectDetailsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + +Response response = await client.GetProjectDetailsAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetProjectDetailsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetProjectDetailsAsync(""); @@ -20,22 +31,26 @@ Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").To Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-project-details - - +]]> - -This sample shows how to call GetProjectDetails with required parameters and parse the result. + +This sample shows how to call GetProjectDetails and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + +Response response = client.GetProjectDetails(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetProjectDetails with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetProjectDetails(""); @@ -48,48 +63,42 @@ Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").To Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-project-details - - +]]> - -This sample shows how to call CreateProjectAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateProjectAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - language = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["language"] = "", +}); +Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateProjectAsync with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - description = "", - language = "", - multilingualResource = true, - settings = new { - defaultAnswer = "", - }, -}; +This sample shows how to call CreateProjectAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() + { + ["defaultAnswer"] = "", + }, +}); +Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -100,48 +109,42 @@ Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").To Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/create-project - - +]]> - -This sample shows how to call CreateProject with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateProject and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -var data = new { - language = "", -}; - -Response response = client.CreateProject("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["language"] = "", +}); +Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateProject with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - description = "", - language = "", - multilingualResource = true, - settings = new { - defaultAnswer = "", - }, -}; +This sample shows how to call CreateProject with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = client.CreateProject("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() + { + ["defaultAnswer"] = "", + }, +}); +Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -152,1448 +155,1629 @@ Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").To Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/create-project - - +]]> - -This sample shows how to call GetDeleteStatusAsync with required parameters and parse the result. + +This sample shows how to call GetDeleteStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetDeleteStatusAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetDeleteStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-delete-status +Response response = await client.GetDeleteStatusAsync(""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetDeleteStatus with required parameters and parse the result. + +This sample shows how to call GetDeleteStatus and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetDeleteStatus(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetDeleteStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-delete-status +Response response = client.GetDeleteStatus(""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetExportStatusAsync with required parameters and parse the result. + +This sample shows how to call GetExportStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetExportStatusAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetExportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-export-status +Response response = await client.GetExportStatusAsync("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetExportStatus with required parameters and parse the result. + +This sample shows how to call GetExportStatus and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetExportStatus("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetExportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-export-status +Response response = client.GetExportStatus("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetImportStatusAsync with required parameters and parse the result. + +This sample shows how to call GetImportStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetImportStatusAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetImportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-import-status +Response response = await client.GetImportStatusAsync("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetImportStatus with required parameters and parse the result. + +This sample shows how to call GetImportStatus and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetImportStatus("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetImportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-import-status +Response response = client.GetImportStatus("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetDeployStatusAsync with required parameters and parse the result. + +This sample shows how to call GetDeployStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetDeployStatusAsync("", "", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetDeployStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-deploy-status +Response response = await client.GetDeployStatusAsync("", "", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetDeployStatus with required parameters and parse the result. + +This sample shows how to call GetDeployStatus and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetDeployStatus("", "", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetDeployStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-deploy-status +Response response = client.GetDeployStatus("", "", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call UpdateSynonymsAsync with required parameters. + +This sample shows how to call UpdateSynonymsAsync. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -var data = new {}; - -Response response = await client.UpdateSynonymsAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateSynonymsAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateSynonymsAsync with all parameters and request content. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - value = new[] { - new { - alterations = new[] { - "" - }, - } - }, - nextLink = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = await client.UpdateSynonymsAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["value"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["nextLink"] = "", +}); +Response response = await client.UpdateSynonymsAsync("", content); Console.WriteLine(response.Status); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/update-synonyms - - +]]> - -This sample shows how to call UpdateSynonyms with required parameters. + +This sample shows how to call UpdateSynonyms. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new {}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = client.UpdateSynonyms("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateSynonyms("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateSynonyms with all parameters and request content. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - value = new[] { - new { - alterations = new[] { - "" - }, - } - }, - nextLink = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = client.UpdateSynonyms("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["value"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["nextLink"] = "", +}); +Response response = client.UpdateSynonyms("", content); Console.WriteLine(response.Status); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/update-synonyms - - +]]> - -This sample shows how to call GetUpdateSourcesStatusAsync with required parameters and parse the result. + +This sample shows how to call GetUpdateSourcesStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetUpdateSourcesStatusAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetUpdateSourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-update-sources-status +Response response = await client.GetUpdateSourcesStatusAsync("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetUpdateSourcesStatus with required parameters and parse the result. + +This sample shows how to call GetUpdateSourcesStatus and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetUpdateSourcesStatus("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetUpdateSourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-update-sources-status +Response response = client.GetUpdateSourcesStatus("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetUpdateQnasStatusAsync with required parameters and parse the result. + +This sample shows how to call GetUpdateQnasStatusAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetUpdateQnasStatusAsync("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetUpdateQnasStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-update-qnas-status +Response response = await client.GetUpdateQnasStatusAsync("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call GetUpdateQnasStatus with required parameters and parse the result. + +This sample shows how to call GetUpdateQnasStatus and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetUpdateQnasStatus("", ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> - - +This sample shows how to call GetUpdateQnasStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-update-qnas-status +Response response = client.GetUpdateQnasStatus("", ""); - +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> - -This sample shows how to call AddFeedbackAsync with required parameters. + +This sample shows how to call AddFeedbackAsync. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -var data = new {}; - -Response response = await client.AddFeedbackAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.AddFeedbackAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddFeedbackAsync with all parameters and request content. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - records = new[] { - new { - userId = "", - userQuestion = "", - qnaId = 1234, - } - }, -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = await client.AddFeedbackAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["records"] = new List() +{ +new Dictionary() +{ +["userId"] = "", +["userQuestion"] = "", +["qnaId"] = 1234, +} +}, +}); +Response response = await client.AddFeedbackAsync("", content); Console.WriteLine(response.Status); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/add-feedback - - +]]> - -This sample shows how to call AddFeedback with required parameters. + +This sample shows how to call AddFeedback. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new {}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = client.AddFeedback("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.AddFeedback("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddFeedback with all parameters and request content. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - records = new[] { - new { - userId = "", - userQuestion = "", - qnaId = 1234, - } - }, -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Response response = client.AddFeedback("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["records"] = new List() +{ +new Dictionary() +{ +["userId"] = "", +["userQuestion"] = "", +["qnaId"] = 1234, +} +}, +}); +Response response = client.AddFeedback("", content); Console.WriteLine(response.Status); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/add-feedback - - +]]> - + This sample shows how to call GetProjectsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in client.GetProjectsAsync()) +await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("multilingualResource").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/list-projects +This sample shows how to call GetProjectsAsync with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetProjectsAsync()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("multilingualResource").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("defaultAnswer").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); +} +]]> - + This sample shows how to call GetProjects and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in client.GetProjects()) +foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("multilingualResource").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/list-projects +This sample shows how to call GetProjects with all request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetProjects()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("multilingualResource").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("defaultAnswer").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); +} +]]> - -This sample shows how to call GetDeploymentsAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in client.GetDeploymentsAsync("")) +await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/list-deployments +This sample shows how to call GetDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetDeploymentsAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); +} +]]> - -This sample shows how to call GetDeployments with required parameters and parse the result. + +This sample shows how to call GetDeployments and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in client.GetDeployments("")) +foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/list-deployments +This sample shows how to call GetDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetDeployments("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); +} +]]> - -This sample shows how to call GetSynonymsAsync with required parameters and parse the result. + +This sample shows how to call GetSynonymsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in client.GetSynonymsAsync("")) +await foreach (BinaryData item in client.GetSynonymsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("alterations")[0].ToString()); + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-synonyms +This sample shows how to call GetSynonymsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetSynonymsAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); +} +]]> - -This sample shows how to call GetSynonyms with required parameters and parse the result. + +This sample shows how to call GetSynonyms and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in client.GetSynonyms("")) +foreach (BinaryData item in client.GetSynonyms("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("alterations")[0].ToString()); + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-synonyms +This sample shows how to call GetSynonyms with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetSynonyms("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); +} +]]> - -This sample shows how to call GetSourcesAsync with required parameters and parse the result. + +This sample shows how to call GetSourcesAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in client.GetSourcesAsync("")) +await foreach (BinaryData item in client.GetSourcesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-sources +This sample shows how to call GetSourcesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +await foreach (BinaryData item in client.GetSourcesAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); +} +]]> - -This sample shows how to call GetSources with required parameters and parse the result. + +This sample shows how to call GetSources and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in client.GetSources("")) +foreach (BinaryData item in client.GetSources("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-sources +This sample shows how to call GetSources with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +foreach (BinaryData item in client.GetSources("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); +} +]]> - -This sample shows how to call GetQnasAsync with required parameters and parse the result. + +This sample shows how to call GetQnasAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in client.GetQnasAsync("")) +await foreach (BinaryData item in client.GetQnasAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetQnasAsync with all parameters, and how to parse the result. +This sample shows how to call GetQnasAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in client.GetQnasAsync("", "")) +await foreach (BinaryData item in client.GetQnasAsync("", source: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); } -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-qnas - - +]]> - -This sample shows how to call GetQnas with required parameters and parse the result. + +This sample shows how to call GetQnas and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in client.GetQnas("")) +foreach (BinaryData item in client.GetQnas("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetQnas with all parameters, and how to parse the result. +This sample shows how to call GetQnas with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in client.GetQnas("", "")) +foreach (BinaryData item in client.GetQnas("", source: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); } -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-qnas - - +]]> - -This sample shows how to call DeleteProjectAsync with required parameters. + +This sample shows how to call DeleteProjectAsync. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/delete-project +This sample shows how to call DeleteProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> - -This sample shows how to call DeleteProject with required parameters. + +This sample shows how to call DeleteProject. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -var operation = client.DeleteProject(WaitUntil.Completed, ""); - -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/delete-project +This sample shows how to call DeleteProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> - -This sample shows how to call ExportAsync with required parameters and parse the result. + +This sample shows how to call ExportAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var operation = await client.ExportAsync(WaitUntil.Completed, ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Operation operation = await client.ExportAsync(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call ExportAsync with all parameters, and how to parse the result. +This sample shows how to call ExportAsync with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var operation = await client.ExportAsync(WaitUntil.Completed, "", "", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/export - - +]]> - -This sample shows how to call Export with required parameters and parse the result. + +This sample shows how to call Export and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var operation = client.Export(WaitUntil.Completed, ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Operation operation = client.Export(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call Export with all parameters, and how to parse the result. +This sample shows how to call Export with all parameters and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var operation = client.Export(WaitUntil.Completed, "", "", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Operation operation = client.Export(WaitUntil.Completed, "", format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/export - - +]]> - -This sample shows how to call ImportAsync with required parameters and parse the result. + +This sample shows how to call ImportAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new {}; - -var operation = await client.ImportAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +RequestContent content = null; +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call ImportAsync with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - metadata = new { - description = "", - language = "", - multilingualResource = true, - settings = new { - defaultAnswer = "", +This sample shows how to call ImportAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["metadata"] = new Dictionary() + { + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() + { + ["defaultAnswer"] = "", }, }, - assets = new { - synonyms = new[] { - new { - alterations = new[] { - "" - }, - } - }, - qnas = new[] { - new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - qna = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - } - }, + ["assets"] = new Dictionary() + { + ["synonyms"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["qnas"] = new List() +{ +new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = null +, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +null +}, +} +}, }, - fileUri = "", -}; - -var operation = await client.ImportAsync(WaitUntil.Completed, "", RequestContent.Create(data), "", ""); - + ["fileUri"] = "", +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/import - - +]]> - -This sample shows how to call Import with required parameters and parse the result. + +This sample shows how to call Import and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new {}; - -var operation = client.Import(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +RequestContent content = null; +Operation operation = client.Import(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call Import with all parameters and request content, and how to parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new { - metadata = new { - description = "", - language = "", - multilingualResource = true, - settings = new { - defaultAnswer = "", +This sample shows how to call Import with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["metadata"] = new Dictionary() + { + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() + { + ["defaultAnswer"] = "", }, }, - assets = new { - synonyms = new[] { - new { - alterations = new[] { - "" - }, - } - }, - qnas = new[] { - new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - qna = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - } - }, + ["assets"] = new Dictionary() + { + ["synonyms"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["qnas"] = new List() +{ +new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = null +, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +null +}, +} +}, }, - fileUri = "", -}; - -var operation = client.Import(WaitUntil.Completed, "", RequestContent.Create(data), "", ""); - + ["fileUri"] = "", +}); +Operation operation = client.Import(WaitUntil.Completed, "", content, format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/import - - +]]> - -This sample shows how to call DeployProjectAsync with required parameters and parse the result. + +This sample shows how to call DeployProjectAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var operation = await client.DeployProjectAsync(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("deploymentName").ToString()); -Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.ToString()); ]]> - - +This sample shows how to call DeployProjectAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/deploy-project +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", ""); +BinaryData responseData = operation.Value; - +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +]]> - -This sample shows how to call DeployProject with required parameters and parse the result. + +This sample shows how to call DeployProject and parse the result. "); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var operation = client.DeployProject(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); +Operation operation = client.DeployProject(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; -Console.WriteLine(result.GetProperty("deploymentName").ToString()); -Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.ToString()); ]]> - - +This sample shows how to call DeployProject with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/deploy-project +Operation operation = client.DeployProject(WaitUntil.Completed, "", ""); +BinaryData responseData = operation.Value; - +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +]]> - -This sample shows how to call UpdateSourcesAsync with required parameters and request content and parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new[] { - new { - op = "add", - value = new { - displayName = "", - source = "", - sourceUri = "http://localhost:3000", - sourceKind = "file", - contentStructureKind = "unstructured", - }, - } -}; - -var operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + +This sample shows how to call UpdateSourcesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in operation.Value) +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +}, +} +}); +Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); +await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/update-sources +This sample shows how to call UpdateSourcesAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["displayName"] = "", +["source"] = "", +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +["contentStructureKind"] = "unstructured", +}, +} +}); +Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); +await foreach (BinaryData item in operation.Value) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); +} +]]> - -This sample shows how to call UpdateSources with required parameters and request content and parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new[] { - new { - op = "add", - value = new { - displayName = "", - source = "", - sourceUri = "http://localhost:3000", - sourceKind = "file", - contentStructureKind = "unstructured", - }, - } -}; - -var operation = client.UpdateSources(WaitUntil.Completed, "", RequestContent.Create(data)); + +This sample shows how to call UpdateSources and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in operation.Value) +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +}, +} +}); +Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); +foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/update-sources +This sample shows how to call UpdateSources with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["displayName"] = "", +["source"] = "", +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +["contentStructureKind"] = "unstructured", +}, +} +}); +Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); +foreach (BinaryData item in operation.Value) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); +} +]]> - -This sample shows how to call UpdateQnasAsync with required parameters and request content and parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new[] { - new { - op = "add", - value = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - } -}; - -var operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + +This sample shows how to call UpdateQnasAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -await foreach (var item in operation.Value) +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary(), +} +}); +Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); +await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/update-qnas +This sample shows how to call UpdateQnasAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = null +, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +} +}); +Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); +await foreach (BinaryData item in operation.Value) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); +} +]]> - -This sample shows how to call UpdateQnas with required parameters and request content and parse the result. -"); -var endpoint = new Uri(""); -var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - -var data = new[] { - new { - op = "add", - value = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - } -}; - -var operation = client.UpdateQnas(WaitUntil.Completed, "", RequestContent.Create(data)); + +This sample shows how to call UpdateQnas and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); -foreach (var item in operation.Value) +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary(), +} +}); +Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); +foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - - - -Additional information can be found in the service REST API documentation: -https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/update-qnas +This sample shows how to call UpdateQnas with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = null +, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +} +}); +Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); +foreach (BinaryData item in operation.Value) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/tests/Generated/Samples/Samples_QuestionAnsweringAuthoringClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/tests/Generated/Samples/Samples_QuestionAnsweringAuthoringClient.cs index e1f214c3286c..fc46ab119997 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/tests/Generated/Samples/Samples_QuestionAnsweringAuthoringClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/tests/Generated/Samples/Samples_QuestionAnsweringAuthoringClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.AI.Language.QuestionAnswering.Authoring; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,9 +23,9 @@ public class Samples_QuestionAnsweringAuthoringClient [Ignore("Only validating compilation of examples")] public void Example_GetProjectDetails() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetProjectDetails(""); @@ -37,9 +37,9 @@ public void Example_GetProjectDetails() [Ignore("Only validating compilation of examples")] public void Example_GetProjectDetails_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetProjectDetails(""); @@ -58,9 +58,9 @@ public void Example_GetProjectDetails_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjectDetails_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetProjectDetailsAsync(""); @@ -72,9 +72,9 @@ public async Task Example_GetProjectDetails_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjectDetails_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetProjectDetailsAsync(""); @@ -93,16 +93,15 @@ public async Task Example_GetProjectDetails_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - language = "", - }; - - Response response = client.CreateProject("", RequestContent.Create(data)); + ["language"] = "", + }); + Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -112,22 +111,21 @@ public void Example_CreateProject() [Ignore("Only validating compilation of examples")] public void Example_CreateProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - description = "", - language = "", - multilingualResource = true, - settings = new + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() { - defaultAnswer = "", + ["defaultAnswer"] = "", }, - }; - - Response response = client.CreateProject("", RequestContent.Create(data)); + }); + Response response = client.CreateProject("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -144,16 +142,15 @@ public void Example_CreateProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - language = "", - }; - - Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); + ["language"] = "", + }); + Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -163,22 +160,21 @@ public async Task Example_CreateProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - description = "", - language = "", - multilingualResource = true, - settings = new + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() { - defaultAnswer = "", + ["defaultAnswer"] = "", }, - }; - - Response response = await client.CreateProjectAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateProjectAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -195,9 +191,9 @@ public async Task Example_CreateProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeleteStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetDeleteStatus(""); @@ -212,9 +208,9 @@ public void Example_GetDeleteStatus() [Ignore("Only validating compilation of examples")] public void Example_GetDeleteStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetDeleteStatus(""); @@ -230,9 +226,9 @@ public void Example_GetDeleteStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeleteStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetDeleteStatusAsync(""); @@ -247,9 +243,9 @@ public async Task Example_GetDeleteStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeleteStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetDeleteStatusAsync(""); @@ -265,9 +261,9 @@ public async Task Example_GetDeleteStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetExportStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetExportStatus("", ""); @@ -282,9 +278,9 @@ public void Example_GetExportStatus() [Ignore("Only validating compilation of examples")] public void Example_GetExportStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetExportStatus("", ""); @@ -300,9 +296,9 @@ public void Example_GetExportStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetExportStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetExportStatusAsync("", ""); @@ -317,9 +313,9 @@ public async Task Example_GetExportStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetExportStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetExportStatusAsync("", ""); @@ -335,9 +331,9 @@ public async Task Example_GetExportStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetImportStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetImportStatus("", ""); @@ -352,9 +348,9 @@ public void Example_GetImportStatus() [Ignore("Only validating compilation of examples")] public void Example_GetImportStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetImportStatus("", ""); @@ -370,9 +366,9 @@ public void Example_GetImportStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetImportStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetImportStatusAsync("", ""); @@ -387,9 +383,9 @@ public async Task Example_GetImportStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetImportStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetImportStatusAsync("", ""); @@ -405,9 +401,9 @@ public async Task Example_GetImportStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeployStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetDeployStatus("", "", ""); @@ -422,9 +418,9 @@ public void Example_GetDeployStatus() [Ignore("Only validating compilation of examples")] public void Example_GetDeployStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetDeployStatus("", "", ""); @@ -440,9 +436,9 @@ public void Example_GetDeployStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetDeployStatusAsync("", "", ""); @@ -457,9 +453,9 @@ public async Task Example_GetDeployStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetDeployStatusAsync("", "", ""); @@ -475,13 +471,12 @@ public async Task Example_GetDeployStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateSynonyms() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new { }; - - Response response = client.UpdateSynonyms("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.UpdateSynonyms("", content); Console.WriteLine(response.Status); } @@ -489,23 +484,25 @@ public void Example_UpdateSynonyms() [Ignore("Only validating compilation of examples")] public void Example_UpdateSynonyms_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - value = new[] { - new { - alterations = new[] { - "" - }, - } - }, - nextLink = "", - }; - - Response response = client.UpdateSynonyms("", RequestContent.Create(data)); + ["value"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["nextLink"] = "", + }); + Response response = client.UpdateSynonyms("", content); Console.WriteLine(response.Status); } @@ -513,13 +510,12 @@ public void Example_UpdateSynonyms_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateSynonyms_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - Response response = await client.UpdateSynonymsAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.UpdateSynonymsAsync("", content); Console.WriteLine(response.Status); } @@ -527,23 +523,25 @@ public async Task Example_UpdateSynonyms_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateSynonyms_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - value = new[] { - new { - alterations = new[] { - "" - }, - } - }, - nextLink = "", - }; - - Response response = await client.UpdateSynonymsAsync("", RequestContent.Create(data)); + ["value"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["nextLink"] = "", + }); + Response response = await client.UpdateSynonymsAsync("", content); Console.WriteLine(response.Status); } @@ -551,9 +549,9 @@ public async Task Example_UpdateSynonyms_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateSourcesStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetUpdateSourcesStatus("", ""); @@ -568,9 +566,9 @@ public void Example_GetUpdateSourcesStatus() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateSourcesStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetUpdateSourcesStatus("", ""); @@ -586,9 +584,9 @@ public void Example_GetUpdateSourcesStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateSourcesStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetUpdateSourcesStatusAsync("", ""); @@ -603,9 +601,9 @@ public async Task Example_GetUpdateSourcesStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateSourcesStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetUpdateSourcesStatusAsync("", ""); @@ -621,9 +619,9 @@ public async Task Example_GetUpdateSourcesStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateQnasStatus() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetUpdateQnasStatus("", ""); @@ -638,9 +636,9 @@ public void Example_GetUpdateQnasStatus() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateQnasStatus_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = client.GetUpdateQnasStatus("", ""); @@ -656,9 +654,9 @@ public void Example_GetUpdateQnasStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateQnasStatus_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetUpdateQnasStatusAsync("", ""); @@ -673,9 +671,9 @@ public async Task Example_GetUpdateQnasStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateQnasStatus_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); Response response = await client.GetUpdateQnasStatusAsync("", ""); @@ -691,13 +689,12 @@ public async Task Example_GetUpdateQnasStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddFeedback() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - Response response = client.AddFeedback("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.AddFeedback("", content); Console.WriteLine(response.Status); } @@ -705,22 +702,23 @@ public void Example_AddFeedback() [Ignore("Only validating compilation of examples")] public void Example_AddFeedback_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - records = new[] { - new { - userId = "", - userQuestion = "", - qnaId = 1234, - } - }, - }; - - Response response = client.AddFeedback("", RequestContent.Create(data)); + ["records"] = new List() +{ +new Dictionary() +{ +["userId"] = "", +["userQuestion"] = "", +["qnaId"] = 1234, +} +}, + }); + Response response = client.AddFeedback("", content); Console.WriteLine(response.Status); } @@ -728,13 +726,12 @@ public void Example_AddFeedback_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddFeedback_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - Response response = await client.AddFeedbackAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.AddFeedbackAsync("", content); Console.WriteLine(response.Status); } @@ -742,22 +739,23 @@ public async Task Example_AddFeedback_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddFeedback_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - records = new[] { - new { - userId = "", - userQuestion = "", - qnaId = 1234, - } - }, - }; - - Response response = await client.AddFeedbackAsync("", RequestContent.Create(data)); + ["records"] = new List() +{ +new Dictionary() +{ +["userId"] = "", +["userQuestion"] = "", +["qnaId"] = 1234, +} +}, + }); + Response response = await client.AddFeedbackAsync("", content); Console.WriteLine(response.Status); } @@ -765,14 +763,14 @@ public async Task Example_AddFeedback_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetProjects() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetProjects()) + foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -780,21 +778,21 @@ public void Example_GetProjects() [Ignore("Only validating compilation of examples")] public void Example_GetProjects_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetProjects()) + foreach (BinaryData item in client.GetProjects()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("multilingualResource").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("multilingualResource").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("defaultAnswer").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); } } @@ -802,14 +800,14 @@ public void Example_GetProjects_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjects_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetProjectsAsync()) + await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -817,21 +815,21 @@ public async Task Example_GetProjects_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjects_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetProjectsAsync()) + await foreach (BinaryData item in client.GetProjectsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("language").ToString()); - Console.WriteLine(result.GetProperty("multilingualResource").ToString()); - Console.WriteLine(result.GetProperty("settings").GetProperty("defaultAnswer").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("multilingualResource").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("defaultAnswer").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); } } @@ -839,14 +837,14 @@ public async Task Example_GetProjects_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeployments() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetDeployments("")) + foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -854,15 +852,15 @@ public void Example_GetDeployments() [Ignore("Only validating compilation of examples")] public void Example_GetDeployments_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetDeployments("")) + foreach (BinaryData item in client.GetDeployments("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); } } @@ -870,14 +868,14 @@ public void Example_GetDeployments_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployments_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetDeploymentsAsync("")) + await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -885,15 +883,15 @@ public async Task Example_GetDeployments_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployments_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetDeploymentsAsync("")) + await foreach (BinaryData item in client.GetDeploymentsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentName").ToString()); - Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeployedDateTime").ToString()); } } @@ -901,14 +899,14 @@ public async Task Example_GetDeployments_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSynonyms() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetSynonyms("")) + foreach (BinaryData item in client.GetSynonyms("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("alterations")[0].ToString()); + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); } } @@ -916,14 +914,14 @@ public void Example_GetSynonyms() [Ignore("Only validating compilation of examples")] public void Example_GetSynonyms_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetSynonyms("")) + foreach (BinaryData item in client.GetSynonyms("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("alterations")[0].ToString()); + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); } } @@ -931,14 +929,14 @@ public void Example_GetSynonyms_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSynonyms_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSynonymsAsync("")) + await foreach (BinaryData item in client.GetSynonymsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("alterations")[0].ToString()); + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); } } @@ -946,14 +944,14 @@ public async Task Example_GetSynonyms_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSynonyms_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSynonymsAsync("")) + await foreach (BinaryData item in client.GetSynonymsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("alterations")[0].ToString()); + Console.WriteLine(result[0].GetProperty("alterations")[0].ToString()); } } @@ -961,15 +959,15 @@ public async Task Example_GetSynonyms_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSources() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetSources("")) + foreach (BinaryData item in client.GetSources("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } } @@ -977,18 +975,18 @@ public void Example_GetSources() [Ignore("Only validating compilation of examples")] public void Example_GetSources_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetSources("")) + foreach (BinaryData item in client.GetSources("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); } } @@ -996,15 +994,15 @@ public void Example_GetSources_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSources_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSourcesAsync("")) + await foreach (BinaryData item in client.GetSourcesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } } @@ -1012,18 +1010,18 @@ public async Task Example_GetSources_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSources_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetSourcesAsync("")) + await foreach (BinaryData item in client.GetSourcesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); } } @@ -1031,14 +1029,14 @@ public async Task Example_GetSources_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetQnas() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetQnas("")) + foreach (BinaryData item in client.GetQnas("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1046,35 +1044,35 @@ public void Example_GetQnas() [Ignore("Only validating compilation of examples")] public void Example_GetQnas_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in client.GetQnas("", "")) + foreach (BinaryData item in client.GetQnas("", source: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); } } @@ -1082,14 +1080,14 @@ public void Example_GetQnas_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetQnas_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetQnasAsync("")) + await foreach (BinaryData item in client.GetQnasAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1097,35 +1095,35 @@ public async Task Example_GetQnas_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetQnas_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in client.GetQnasAsync("", "")) + await foreach (BinaryData item in client.GetQnasAsync("", source: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); } } @@ -1133,65 +1131,57 @@ public async Task Example_GetQnas_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = client.DeleteProject(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeleteProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = client.DeleteProject(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_Export() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = client.Export(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = client.Export(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -1203,13 +1193,13 @@ public void Example_Export() [Ignore("Only validating compilation of examples")] public void Example_Export_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = client.Export(WaitUntil.Completed, "", "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = client.Export(WaitUntil.Completed, "", format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); @@ -1222,13 +1212,13 @@ public void Example_Export_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Export_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = await client.ExportAsync(WaitUntil.Completed, ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = await client.ExportAsync(WaitUntil.Completed, ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -1240,13 +1230,13 @@ public async Task Example_Export_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Export_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = await client.ExportAsync(WaitUntil.Completed, "", "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); @@ -1259,15 +1249,14 @@ public async Task Example_Export_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Import() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new { }; - - var operation = client.Import(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + RequestContent content = null; + Operation operation = client.Import(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -1279,96 +1268,106 @@ public void Example_Import() [Ignore("Only validating compilation of examples")] public void Example_Import_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - metadata = new + ["metadata"] = new Dictionary() { - description = "", - language = "", - multilingualResource = true, - settings = new + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() { - defaultAnswer = "", + ["defaultAnswer"] = "", }, }, - assets = new + ["assets"] = new Dictionary() { - synonyms = new[] { - new { - alterations = new[] { - "" - }, - } - }, - qnas = new[] { - new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - qna = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - } - }, + ["synonyms"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["qnas"] = new List() +{ +new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = null +, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +null +}, +} +}, }, - fileUri = "", - }; - - var operation = client.Import(WaitUntil.Completed, "", RequestContent.Create(data), "", ""); - + ["fileUri"] = "", + }); + Operation operation = client.Import(WaitUntil.Completed, "", content, format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); @@ -1381,15 +1380,14 @@ public void Example_Import_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Import_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new { }; - - var operation = await client.ImportAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + RequestContent content = null; + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("jobId").ToString()); @@ -1401,96 +1399,106 @@ public async Task Example_Import_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Import_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - metadata = new + ["metadata"] = new Dictionary() { - description = "", - language = "", - multilingualResource = true, - settings = new + ["description"] = "", + ["language"] = "", + ["multilingualResource"] = true, + ["settings"] = new Dictionary() { - defaultAnswer = "", + ["defaultAnswer"] = "", }, }, - assets = new + ["assets"] = new Dictionary() { - synonyms = new[] { - new { - alterations = new[] { - "" - }, - } - }, - qnas = new[] { - new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - qna = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - } - }, + ["synonyms"] = new List() +{ +new Dictionary() +{ +["alterations"] = new List() +{ +"" +}, +} +}, + ["qnas"] = new List() +{ +new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = null +, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +null +}, +} +}, }, - fileUri = "", - }; - - var operation = await client.ImportAsync(WaitUntil.Completed, "", RequestContent.Create(data), "", ""); - + ["fileUri"] = "", + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, format: "json", assetKind: "qnas"); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); @@ -1503,13 +1511,13 @@ public async Task Example_Import_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeployProject() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = client.DeployProject(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = client.DeployProject(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -1518,13 +1526,13 @@ public void Example_DeployProject() [Ignore("Only validating compilation of examples")] public void Example_DeployProject_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = client.DeployProject(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = client.DeployProject(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); @@ -1534,13 +1542,13 @@ public void Example_DeployProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeployProject_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = await client.DeployProjectAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -1549,13 +1557,13 @@ public async Task Example_DeployProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeployProject_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var operation = await client.DeployProjectAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", ""); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("deploymentName").ToString()); Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); @@ -1565,27 +1573,28 @@ public async Task Example_DeployProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateSources() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new { - sourceUri = "http://localhost:3000", - sourceKind = "file", - }, - } -}; + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var operation = client.UpdateSources(WaitUntil.Completed, "", RequestContent.Create(data)); - - foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +}, +} +}); + Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); + foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } } @@ -1593,33 +1602,34 @@ public void Example_UpdateSources() [Ignore("Only validating compilation of examples")] public void Example_UpdateSources_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new { - displayName = "", - source = "", - sourceUri = "http://localhost:3000", - sourceKind = "file", - contentStructureKind = "unstructured", - }, - } -}; - - var operation = client.UpdateSources(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["displayName"] = "", +["source"] = "", +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +["contentStructureKind"] = "unstructured", +}, +} +}); + Operation> operation = client.UpdateSources(WaitUntil.Completed, "", content); + foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); } } @@ -1627,27 +1637,28 @@ public void Example_UpdateSources_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateSources_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new { - sourceUri = "http://localhost:3000", - sourceKind = "file", - }, - } -}; - - var operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +}, +} +}); + Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); + await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); } } @@ -1655,33 +1666,34 @@ public async Task Example_UpdateSources_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateSources_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new { - displayName = "", - source = "", - sourceUri = "http://localhost:3000", - sourceKind = "file", - contentStructureKind = "unstructured", - }, - } -}; - - var operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["displayName"] = "", +["source"] = "", +["sourceUri"] = "http://localhost:3000", +["sourceKind"] = "file", +["contentStructureKind"] = "unstructured", +}, +} +}); + Operation> operation = await client.UpdateSourcesAsync(WaitUntil.Completed, "", content); + await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceUri").ToString()); - Console.WriteLine(result.GetProperty("sourceKind").ToString()); - Console.WriteLine(result.GetProperty("contentStructureKind").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("sourceUri").ToString()); + Console.WriteLine(result[0].GetProperty("sourceKind").ToString()); + Console.WriteLine(result[0].GetProperty("contentStructureKind").ToString()); } } @@ -1689,23 +1701,23 @@ public async Task Example_UpdateSources_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateQnas() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new {}, - } -}; + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var operation = client.UpdateQnas(WaitUntil.Completed, "", RequestContent.Create(data)); - - foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary(), +} +}); + Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); + foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1713,76 +1725,88 @@ public void Example_UpdateQnas() [Ignore("Only validating compilation of examples")] public void Example_UpdateQnas_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - } -}; + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - var operation = client.UpdateQnas(WaitUntil.Completed, "", RequestContent.Create(data)); - - foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = null +, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +} +}); + Operation> operation = client.UpdateQnas(WaitUntil.Completed, "", content); + foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); } } @@ -1790,23 +1814,23 @@ public void Example_UpdateQnas_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateQnas_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new {}, - } -}; - - var operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary(), +} +}); + Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); + await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1814,76 +1838,88 @@ public async Task Example_UpdateQnas_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateQnas_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new QuestionAnsweringAuthoringClient(endpoint, credential); - - var data = new[] { - new { - op = "add", - value = new { - id = 1234, - answer = "", - source = "", - questions = new[] { - "" - }, - metadata = new { - key = "", - }, - dialog = new { - isContextOnly = true, - prompts = new[] { - new { - displayOrder = 1234, - qnaId = 1234, - displayText = "", - } - }, - }, - activeLearningSuggestions = new[] { - new { - clusterHead = "", - suggestedQuestions = new[] { - new { - question = "", - userSuggestedCount = 1234, - autoSuggestedCount = 1234, - } - }, - } - }, - }, - } -}; - - var operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + QuestionAnsweringAuthoringClient client = new QuestionAnsweringAuthoringClient(endpoint, credential); - await foreach (var item in operation.Value) + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["op"] = "add", +["value"] = new Dictionary() +{ +["id"] = 1234, +["answer"] = "", +["source"] = "", +["questions"] = new List() +{ +"" +}, +["metadata"] = new Dictionary() +{ +["key"] = "", +}, +["dialog"] = new Dictionary() +{ +["isContextOnly"] = true, +["prompts"] = new List() +{ +new Dictionary() +{ +["displayOrder"] = 1234, +["qnaId"] = 1234, +["qna"] = null +, +["displayText"] = "", +} +}, +}, +["activeLearningSuggestions"] = new List() +{ +new Dictionary() +{ +["clusterHead"] = "", +["suggestedQuestions"] = new List() +{ +new Dictionary() +{ +["question"] = "", +["userSuggestedCount"] = 1234, +["autoSuggestedCount"] = 1234, +} +}, +} +}, +}, +} +}); + Operation> operation = await client.UpdateQnasAsync(WaitUntil.Completed, "", content); + await foreach (BinaryData item in operation.Value) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("isContextOnly").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); - Console.WriteLine(result.GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("isContextOnly").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayOrder").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qnaId").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("answer").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("source").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("questions")[0].ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("qna").GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("dialog").GetProperty("prompts")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("clusterHead").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("question").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("userSuggestedCount").ToString()); + Console.WriteLine(result[0].GetProperty("activeLearningSuggestions")[0].GetProperty("suggestedQuestions")[0].GetProperty("autoSuggestedCount").ToString()); } } } diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerCertificateClient.xml b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerCertificateClient.xml index 7dd538153711..e9aadce888c0 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerCertificateClient.xml +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerCertificateClient.xml @@ -2,34 +2,48 @@ - -This sample shows how to call GetLedgerIdentityAsync with required parameters and parse the result. + +This sample shows how to call GetLedgerIdentityAsync and parse the result. "); -var client = new ConfidentialLedgerCertificateClient(endpoint); +ConfidentialLedgerCertificateClient client = new ConfidentialLedgerCertificateClient(new Uri("http://localhost:3000")); Response response = await client.GetLedgerIdentityAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("ledgerId").ToString()); Console.WriteLine(result.GetProperty("ledgerTlsCertificate").ToString()); ]]> - +This sample shows how to call GetLedgerIdentityAsync with all parameters and parse the result. +"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("ledgerId").ToString()); +Console.WriteLine(result.GetProperty("ledgerTlsCertificate").ToString()); +]]> - -This sample shows how to call GetLedgerIdentity with required parameters and parse the result. + +This sample shows how to call GetLedgerIdentity and parse the result. "); -var client = new ConfidentialLedgerCertificateClient(endpoint); +ConfidentialLedgerCertificateClient client = new ConfidentialLedgerCertificateClient(new Uri("http://localhost:3000")); Response response = client.GetLedgerIdentity(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("ledgerId").ToString()); Console.WriteLine(result.GetProperty("ledgerTlsCertificate").ToString()); ]]> - +This sample shows how to call GetLedgerIdentity with all parameters and parse the result. +"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("ledgerId").ToString()); +Console.WriteLine(result.GetProperty("ledgerTlsCertificate").ToString()); +]]> \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml index de858ef56293..905aba46d498 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml @@ -2,12 +2,11 @@ - + This sample shows how to call GetConstitutionAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetConstitutionAsync(); @@ -15,15 +14,24 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("digest").ToString()); Console.WriteLine(result.GetProperty("script").ToString()); ]]> - +This sample shows how to call GetConstitutionAsync with all request content and parse the result. + - + This sample shows how to call GetConstitution and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetConstitution(); @@ -31,179 +39,209 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("digest").ToString()); Console.WriteLine(result.GetProperty("script").ToString()); ]]> - +This sample shows how to call GetConstitution with all request content and parse the result. + - + This sample shows how to call GetEnclaveQuotesAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetEnclaveQuotesAsync(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("currentNodeId").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); ]]> - +This sample shows how to call GetEnclaveQuotesAsync with all request content and parse the result. +").GetProperty("nodeId").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); +]]> - + This sample shows how to call GetEnclaveQuotes and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetEnclaveQuotes(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("currentNodeId").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); -Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); ]]> - +This sample shows how to call GetEnclaveQuotes with all request content and parse the result. +").GetProperty("nodeId").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); +Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); +]]> - -This sample shows how to call CreateLedgerEntryAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateLedgerEntryAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -var data = new { - contents = "", -}; - -Response response = await client.CreateLedgerEntryAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["contents"] = "", +}); +Response response = await client.CreateLedgerEntryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); ]]> -This sample shows how to call CreateLedgerEntryAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateLedgerEntryAsync with all parameters and request content and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -var data = new { - contents = "", -}; - -Response response = await client.CreateLedgerEntryAsync(RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["contents"] = "", +}); +Response response = await client.CreateLedgerEntryAsync(content, collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); -]]> - +]]> - -This sample shows how to call CreateLedgerEntry with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateLedgerEntry and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); - -var data = new { - contents = "", -}; +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -Response response = client.CreateLedgerEntry(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["contents"] = "", +}); +Response response = client.CreateLedgerEntry(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); ]]> -This sample shows how to call CreateLedgerEntry with all parameters and request content, and how to parse the result. +This sample shows how to call CreateLedgerEntry with all parameters and request content and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); - -var data = new { - contents = "", -}; +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -Response response = client.CreateLedgerEntry(RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["contents"] = "", +}); +Response response = client.CreateLedgerEntry(content, collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); -]]> - +]]> - -This sample shows how to call GetLedgerEntryAsync with required parameters and parse the result. + +This sample shows how to call GetLedgerEntryAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetLedgerEntryAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); ]]> -This sample shows how to call GetLedgerEntryAsync with all parameters, and how to parse the result. +This sample shows how to call GetLedgerEntryAsync with all parameters and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -Response response = await client.GetLedgerEntryAsync("", ""); +Response response = await client.GetLedgerEntryAsync("", collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); Console.WriteLine(result.GetProperty("entry").GetProperty("contents").ToString()); Console.WriteLine(result.GetProperty("entry").GetProperty("collectionId").ToString()); Console.WriteLine(result.GetProperty("entry").GetProperty("transactionId").ToString()); -]]> - +]]> - -This sample shows how to call GetLedgerEntry with required parameters and parse the result. + +This sample shows how to call GetLedgerEntry and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetLedgerEntry(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); ]]> -This sample shows how to call GetLedgerEntry with all parameters, and how to parse the result. +This sample shows how to call GetLedgerEntry with all parameters and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -Response response = client.GetLedgerEntry("", ""); +Response response = client.GetLedgerEntry("", collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); Console.WriteLine(result.GetProperty("entry").GetProperty("contents").ToString()); Console.WriteLine(result.GetProperty("entry").GetProperty("collectionId").ToString()); Console.WriteLine(result.GetProperty("entry").GetProperty("transactionId").ToString()); -]]> - +]]> - -This sample shows how to call GetReceiptAsync with required parameters and parse the result. + +This sample shows how to call GetReceiptAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); + +Response response = await client.GetReceiptAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("transactionId").ToString()); +]]> +This sample shows how to call GetReceiptAsync with all parameters and parse the result. +"); @@ -221,16 +259,25 @@ Console.WriteLine(result.GetProperty("receipt").GetProperty("serviceEndorsements Console.WriteLine(result.GetProperty("receipt").GetProperty("signature").ToString()); Console.WriteLine(result.GetProperty("state").ToString()); Console.WriteLine(result.GetProperty("transactionId").ToString()); -]]> - +]]> - -This sample shows how to call GetReceipt with required parameters and parse the result. + +This sample shows how to call GetReceipt and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); + +Response response = client.GetReceipt(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("transactionId").ToString()); +]]> +This sample shows how to call GetReceipt with all parameters and parse the result. +"); @@ -248,16 +295,14 @@ Console.WriteLine(result.GetProperty("receipt").GetProperty("serviceEndorsements Console.WriteLine(result.GetProperty("receipt").GetProperty("signature").ToString()); Console.WriteLine(result.GetProperty("state").ToString()); Console.WriteLine(result.GetProperty("transactionId").ToString()); -]]> - +]]> - -This sample shows how to call GetTransactionStatusAsync with required parameters and parse the result. + +This sample shows how to call GetTransactionStatusAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetTransactionStatusAsync(""); @@ -265,15 +310,24 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); Console.WriteLine(result.GetProperty("transactionId").ToString()); ]]> - +This sample shows how to call GetTransactionStatusAsync with all parameters and parse the result. +"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("transactionId").ToString()); +]]> - -This sample shows how to call GetTransactionStatus with required parameters and parse the result. + +This sample shows how to call GetTransactionStatus and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetTransactionStatus(""); @@ -281,287 +335,375 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); Console.WriteLine(result.GetProperty("transactionId").ToString()); ]]> - +This sample shows how to call GetTransactionStatus with all parameters and parse the result. +"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("transactionId").ToString()); +]]> - + This sample shows how to call GetCurrentLedgerEntryAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetCurrentLedgerEntryAsync(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("contents").ToString()); ]]> -This sample shows how to call GetCurrentLedgerEntryAsync with all parameters, and how to parse the result. +This sample shows how to call GetCurrentLedgerEntryAsync with all parameters and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -Response response = await client.GetCurrentLedgerEntryAsync(""); +Response response = await client.GetCurrentLedgerEntryAsync(collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("contents").ToString()); Console.WriteLine(result.GetProperty("collectionId").ToString()); Console.WriteLine(result.GetProperty("transactionId").ToString()); -]]> - +]]> - + This sample shows how to call GetCurrentLedgerEntry and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetCurrentLedgerEntry(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("contents").ToString()); ]]> -This sample shows how to call GetCurrentLedgerEntry with all parameters, and how to parse the result. +This sample shows how to call GetCurrentLedgerEntry with all parameters and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -Response response = client.GetCurrentLedgerEntry(""); +Response response = client.GetCurrentLedgerEntry(collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("contents").ToString()); Console.WriteLine(result.GetProperty("collectionId").ToString()); Console.WriteLine(result.GetProperty("transactionId").ToString()); -]]> - +]]> - -This sample shows how to call DeleteUserAsync with required parameters. + +This sample shows how to call DeleteUserAsync. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.DeleteUserAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteUserAsync with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteUser with required parameters. + +This sample shows how to call DeleteUser. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.DeleteUser(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteUser with all parameters. +"); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetUserAsync with required parameters and parse the result. + +This sample shows how to call GetUserAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetUserAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); -Console.WriteLine(result.GetProperty("userId").ToString()); ]]> - +This sample shows how to call GetUserAsync with all parameters and parse the result. +"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("assignedRole").ToString()); +Console.WriteLine(result.GetProperty("userId").ToString()); +]]> - -This sample shows how to call GetUser with required parameters and parse the result. + +This sample shows how to call GetUser and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetUser(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); -Console.WriteLine(result.GetProperty("userId").ToString()); ]]> - +This sample shows how to call GetUser with all parameters and parse the result. +"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("assignedRole").ToString()); +Console.WriteLine(result.GetProperty("userId").ToString()); +]]> - -This sample shows how to call CreateOrUpdateUserAsync with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdateUserAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -var data = new { - assignedRole = "Administrator", -}; +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["assignedRole"] = "Administrator", +}); +Response response = await client.CreateOrUpdateUserAsync("", content); -Response response = await client.CreateOrUpdateUserAsync("", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("assignedRole").ToString()); +]]> +This sample shows how to call CreateOrUpdateUserAsync with all parameters and request content and parse the result. +() +{ + ["assignedRole"] = "Administrator", +}); +Response response = await client.CreateOrUpdateUserAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); Console.WriteLine(result.GetProperty("userId").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateUser with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdateUser and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -var data = new { - assignedRole = "Administrator", -}; +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["assignedRole"] = "Administrator", +}); +Response response = client.CreateOrUpdateUser("", content); -Response response = client.CreateOrUpdateUser("", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("assignedRole").ToString()); +]]> +This sample shows how to call CreateOrUpdateUser with all parameters and request content and parse the result. +() +{ + ["assignedRole"] = "Administrator", +}); +Response response = client.CreateOrUpdateUser("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); Console.WriteLine(result.GetProperty("userId").ToString()); -]]> - +]]> - + This sample shows how to call GetConsortiumMembersAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -await foreach (var item in client.GetConsortiumMembersAsync()) +await foreach (BinaryData item in client.GetConsortiumMembersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("certificate").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("certificate").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); } ]]> - +This sample shows how to call GetConsortiumMembersAsync with all request content and parse the result. + - + This sample shows how to call GetConsortiumMembers and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -foreach (var item in client.GetConsortiumMembers()) +foreach (BinaryData item in client.GetConsortiumMembers()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("certificate").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("certificate").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); } ]]> - +This sample shows how to call GetConsortiumMembers with all request content and parse the result. + - + This sample shows how to call GetCollectionsAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -await foreach (var item in client.GetCollectionsAsync()) +await foreach (BinaryData item in client.GetCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); } ]]> - +This sample shows how to call GetCollectionsAsync with all request content and parse the result. + - + This sample shows how to call GetCollections and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -foreach (var item in client.GetCollections()) +foreach (BinaryData item in client.GetCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); } ]]> - +This sample shows how to call GetCollections with all request content and parse the result. + - + This sample shows how to call GetLedgerEntriesAsync and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -await foreach (var item in client.GetLedgerEntriesAsync()) +await foreach (BinaryData item in client.GetLedgerEntriesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); } ]]> -This sample shows how to call GetLedgerEntriesAsync with all parameters, and how to parse the result. +This sample shows how to call GetLedgerEntriesAsync with all parameters and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -await foreach (var item in client.GetLedgerEntriesAsync("", "", "")) +await foreach (BinaryData item in client.GetLedgerEntriesAsync(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); - Console.WriteLine(result.GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("transactionId").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("transactionId").ToString()); } -]]> - +]]> - + This sample shows how to call GetLedgerEntries and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -foreach (var item in client.GetLedgerEntries()) +foreach (BinaryData item in client.GetLedgerEntries()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); } ]]> -This sample shows how to call GetLedgerEntries with all parameters, and how to parse the result. +This sample shows how to call GetLedgerEntries with all parameters and parse the result. "); -var client = new ConfidentialLedgerClient(endpoint, credential); +TokenCredential credential = new DefaultAzureCredential(); +ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); -foreach (var item in client.GetLedgerEntries("", "", "")) +foreach (BinaryData item in client.GetLedgerEntries(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); - Console.WriteLine(result.GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("transactionId").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("transactionId").ToString()); } -]]> - +]]> \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerCertificateClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerCertificateClient.cs index 48ed727a39d9..a249a40010f2 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerCertificateClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerCertificateClient.cs @@ -6,13 +6,11 @@ #nullable disable using System; -using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; -using Azure.Core; using Azure.Identity; +using Azure.Security.ConfidentialLedger.Certificate; using NUnit.Framework; namespace Azure.Security.ConfidentialLedger.Certificate.Samples @@ -23,8 +21,7 @@ public class Samples_ConfidentialLedgerCertificateClient [Ignore("Only validating compilation of examples")] public void Example_GetLedgerIdentity() { - var endpoint = new Uri(""); - var client = new ConfidentialLedgerCertificateClient(endpoint); + ConfidentialLedgerCertificateClient client = new ConfidentialLedgerCertificateClient(new Uri("http://localhost:3000")); Response response = client.GetLedgerIdentity(""); @@ -36,8 +33,7 @@ public void Example_GetLedgerIdentity() [Ignore("Only validating compilation of examples")] public void Example_GetLedgerIdentity_AllParameters() { - var endpoint = new Uri(""); - var client = new ConfidentialLedgerCertificateClient(endpoint); + ConfidentialLedgerCertificateClient client = new ConfidentialLedgerCertificateClient(new Uri("http://localhost:3000")); Response response = client.GetLedgerIdentity(""); @@ -50,8 +46,7 @@ public void Example_GetLedgerIdentity_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLedgerIdentity_Async() { - var endpoint = new Uri(""); - var client = new ConfidentialLedgerCertificateClient(endpoint); + ConfidentialLedgerCertificateClient client = new ConfidentialLedgerCertificateClient(new Uri("http://localhost:3000")); Response response = await client.GetLedgerIdentityAsync(""); @@ -63,8 +58,7 @@ public async Task Example_GetLedgerIdentity_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLedgerIdentity_AllParameters_Async() { - var endpoint = new Uri(""); - var client = new ConfidentialLedgerCertificateClient(endpoint); + ConfidentialLedgerCertificateClient client = new ConfidentialLedgerCertificateClient(new Uri("http://localhost:3000")); Response response = await client.GetLedgerIdentityAsync(""); diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs index 87932464075a..37051e1f62cc 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Security.ConfidentialLedger; using NUnit.Framework; namespace Azure.Security.ConfidentialLedger.Samples @@ -23,9 +23,8 @@ public class Samples_ConfidentialLedgerClient [Ignore("Only validating compilation of examples")] public void Example_GetConstitution() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetConstitution(); @@ -38,9 +37,8 @@ public void Example_GetConstitution() [Ignore("Only validating compilation of examples")] public void Example_GetConstitution_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetConstitution(); @@ -53,9 +51,8 @@ public void Example_GetConstitution_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetConstitution_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetConstitutionAsync(); @@ -68,9 +65,8 @@ public async Task Example_GetConstitution_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetConstitution_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetConstitutionAsync(); @@ -83,86 +79,80 @@ public async Task Example_GetConstitution_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetEnclaveQuotes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetEnclaveQuotes(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("currentNodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetEnclaveQuotes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetEnclaveQuotes(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("currentNodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetEnclaveQuotes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetEnclaveQuotesAsync(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("currentNodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetEnclaveQuotes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetEnclaveQuotesAsync(); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("currentNodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); - Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("mrenclave").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("quoteVersion").ToString()); + Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("").GetProperty("raw").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateLedgerEntry() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - contents = "", - }; - - Response response = client.CreateLedgerEntry(RequestContent.Create(data)); + ["contents"] = "", + }); + Response response = client.CreateLedgerEntry(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); @@ -172,16 +162,14 @@ public void Example_CreateLedgerEntry() [Ignore("Only validating compilation of examples")] public void Example_CreateLedgerEntry_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - contents = "", - }; - - Response response = client.CreateLedgerEntry(RequestContent.Create(data), ""); + ["contents"] = "", + }); + Response response = client.CreateLedgerEntry(content, collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); @@ -191,16 +179,14 @@ public void Example_CreateLedgerEntry_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateLedgerEntry_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - contents = "", - }; - - Response response = await client.CreateLedgerEntryAsync(RequestContent.Create(data)); + ["contents"] = "", + }); + Response response = await client.CreateLedgerEntryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); @@ -210,16 +196,14 @@ public async Task Example_CreateLedgerEntry_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateLedgerEntry_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - contents = "", - }; - - Response response = await client.CreateLedgerEntryAsync(RequestContent.Create(data), ""); + ["contents"] = "", + }); + Response response = await client.CreateLedgerEntryAsync(content, collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionId").ToString()); @@ -229,9 +213,8 @@ public async Task Example_CreateLedgerEntry_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetLedgerEntry() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetLedgerEntry(""); @@ -243,11 +226,10 @@ public void Example_GetLedgerEntry() [Ignore("Only validating compilation of examples")] public void Example_GetLedgerEntry_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - Response response = client.GetLedgerEntry("", ""); + Response response = client.GetLedgerEntry("", collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); @@ -260,9 +242,8 @@ public void Example_GetLedgerEntry_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLedgerEntry_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetLedgerEntryAsync(""); @@ -274,11 +255,10 @@ public async Task Example_GetLedgerEntry_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLedgerEntry_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - Response response = await client.GetLedgerEntryAsync("", ""); + Response response = await client.GetLedgerEntryAsync("", collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("state").ToString()); @@ -291,9 +271,8 @@ public async Task Example_GetLedgerEntry_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetReceipt() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetReceipt(""); @@ -306,9 +285,8 @@ public void Example_GetReceipt() [Ignore("Only validating compilation of examples")] public void Example_GetReceipt_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetReceipt(""); @@ -332,9 +310,8 @@ public void Example_GetReceipt_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetReceipt_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetReceiptAsync(""); @@ -347,9 +324,8 @@ public async Task Example_GetReceipt_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetReceipt_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetReceiptAsync(""); @@ -373,9 +349,8 @@ public async Task Example_GetReceipt_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTransactionStatus() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetTransactionStatus(""); @@ -388,9 +363,8 @@ public void Example_GetTransactionStatus() [Ignore("Only validating compilation of examples")] public void Example_GetTransactionStatus_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetTransactionStatus(""); @@ -403,9 +377,8 @@ public void Example_GetTransactionStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTransactionStatus_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetTransactionStatusAsync(""); @@ -418,9 +391,8 @@ public async Task Example_GetTransactionStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTransactionStatus_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetTransactionStatusAsync(""); @@ -433,9 +405,8 @@ public async Task Example_GetTransactionStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCurrentLedgerEntry() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetCurrentLedgerEntry(); @@ -447,11 +418,10 @@ public void Example_GetCurrentLedgerEntry() [Ignore("Only validating compilation of examples")] public void Example_GetCurrentLedgerEntry_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - Response response = client.GetCurrentLedgerEntry(""); + Response response = client.GetCurrentLedgerEntry(collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("contents").ToString()); @@ -463,9 +433,8 @@ public void Example_GetCurrentLedgerEntry_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCurrentLedgerEntry_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetCurrentLedgerEntryAsync(); @@ -477,11 +446,10 @@ public async Task Example_GetCurrentLedgerEntry_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCurrentLedgerEntry_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - Response response = await client.GetCurrentLedgerEntryAsync(""); + Response response = await client.GetCurrentLedgerEntryAsync(collectionId: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("contents").ToString()); @@ -493,9 +461,8 @@ public async Task Example_GetCurrentLedgerEntry_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.DeleteUser(""); Console.WriteLine(response.Status); @@ -505,9 +472,8 @@ public void Example_DeleteUser() [Ignore("Only validating compilation of examples")] public void Example_DeleteUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.DeleteUser(""); Console.WriteLine(response.Status); @@ -517,9 +483,8 @@ public void Example_DeleteUser_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.DeleteUserAsync(""); Console.WriteLine(response.Status); @@ -529,9 +494,8 @@ public async Task Example_DeleteUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.DeleteUserAsync(""); Console.WriteLine(response.Status); @@ -541,9 +505,8 @@ public async Task Example_DeleteUser_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetUser(""); @@ -555,9 +518,8 @@ public void Example_GetUser() [Ignore("Only validating compilation of examples")] public void Example_GetUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = client.GetUser(""); @@ -570,9 +532,8 @@ public void Example_GetUser_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetUserAsync(""); @@ -584,9 +545,8 @@ public async Task Example_GetUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); Response response = await client.GetUserAsync(""); @@ -599,16 +559,14 @@ public async Task Example_GetUser_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - assignedRole = "Administrator", - }; - - Response response = client.CreateOrUpdateUser("", RequestContent.Create(data)); + ["assignedRole"] = "Administrator", + }); + Response response = client.CreateOrUpdateUser("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); @@ -618,16 +576,14 @@ public void Example_CreateOrUpdateUser() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - assignedRole = "Administrator", - }; - - Response response = client.CreateOrUpdateUser("", RequestContent.Create(data)); + ["assignedRole"] = "Administrator", + }); + Response response = client.CreateOrUpdateUser("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); @@ -638,16 +594,14 @@ public void Example_CreateOrUpdateUser_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - assignedRole = "Administrator", - }; - - Response response = await client.CreateOrUpdateUserAsync("", RequestContent.Create(data)); + ["assignedRole"] = "Administrator", + }); + Response response = await client.CreateOrUpdateUserAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); @@ -657,16 +611,14 @@ public async Task Example_CreateOrUpdateUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - assignedRole = "Administrator", - }; - - Response response = await client.CreateOrUpdateUserAsync("", RequestContent.Create(data)); + ["assignedRole"] = "Administrator", + }); + Response response = await client.CreateOrUpdateUserAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); @@ -677,15 +629,14 @@ public async Task Example_CreateOrUpdateUser_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetConsortiumMembers() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - foreach (var item in client.GetConsortiumMembers()) + foreach (BinaryData item in client.GetConsortiumMembers()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("certificate").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("certificate").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); } } @@ -693,15 +644,14 @@ public void Example_GetConsortiumMembers() [Ignore("Only validating compilation of examples")] public void Example_GetConsortiumMembers_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - foreach (var item in client.GetConsortiumMembers()) + foreach (BinaryData item in client.GetConsortiumMembers()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("certificate").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("certificate").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); } } @@ -709,15 +659,14 @@ public void Example_GetConsortiumMembers_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetConsortiumMembers_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - await foreach (var item in client.GetConsortiumMembersAsync()) + await foreach (BinaryData item in client.GetConsortiumMembersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("certificate").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("certificate").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); } } @@ -725,15 +674,14 @@ public async Task Example_GetConsortiumMembers_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetConsortiumMembers_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - await foreach (var item in client.GetConsortiumMembersAsync()) + await foreach (BinaryData item in client.GetConsortiumMembersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("certificate").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("certificate").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); } } @@ -741,14 +689,13 @@ public async Task Example_GetConsortiumMembers_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCollections() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - foreach (var item in client.GetCollections()) + foreach (BinaryData item in client.GetCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); } } @@ -756,14 +703,13 @@ public void Example_GetCollections() [Ignore("Only validating compilation of examples")] public void Example_GetCollections_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - foreach (var item in client.GetCollections()) + foreach (BinaryData item in client.GetCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); } } @@ -771,14 +717,13 @@ public void Example_GetCollections_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollections_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - await foreach (var item in client.GetCollectionsAsync()) + await foreach (BinaryData item in client.GetCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); } } @@ -786,14 +731,13 @@ public async Task Example_GetCollections_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollections_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - await foreach (var item in client.GetCollectionsAsync()) + await foreach (BinaryData item in client.GetCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); } } @@ -801,14 +745,13 @@ public async Task Example_GetCollections_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetLedgerEntries() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - foreach (var item in client.GetLedgerEntries()) + foreach (BinaryData item in client.GetLedgerEntries()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); } } @@ -816,16 +759,15 @@ public void Example_GetLedgerEntries() [Ignore("Only validating compilation of examples")] public void Example_GetLedgerEntries_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - foreach (var item in client.GetLedgerEntries("", "", "")) + foreach (BinaryData item in client.GetLedgerEntries(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); - Console.WriteLine(result.GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("transactionId").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("transactionId").ToString()); } } @@ -833,14 +775,13 @@ public void Example_GetLedgerEntries_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLedgerEntries_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - await foreach (var item in client.GetLedgerEntriesAsync()) + await foreach (BinaryData item in client.GetLedgerEntriesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); } } @@ -848,16 +789,15 @@ public async Task Example_GetLedgerEntries_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLedgerEntries_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new ConfidentialLedgerClient(endpoint, credential); + TokenCredential credential = new DefaultAzureCredential(); + ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential); - await foreach (var item in client.GetLedgerEntriesAsync("", "", "")) + await foreach (BinaryData item in client.GetLedgerEntriesAsync(collectionId: "", fromTransactionId: "", toTransactionId: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("contents").ToString()); - Console.WriteLine(result.GetProperty("collectionId").ToString()); - Console.WriteLine(result.GetProperty("transactionId").ToString()); + Console.WriteLine(result[0].GetProperty("contents").ToString()); + Console.WriteLine(result[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result[0].GetProperty("transactionId").ToString()); } } } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml index 5482e93693c0..41cb2d02ba10 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml @@ -2,88 +2,106 @@ - -This sample shows how to call AnalyzeTextAsync with required parameters. + +This sample shows how to call AnalyzeTextAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var body = new AnalyzeTextOptions("") +AnalyzeTextOptions body = new AnalyzeTextOptions(""); +Response response = await client.AnalyzeTextAsync(body); +]]> +This sample shows how to call AnalyzeTextAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeTextOptions body = new AnalyzeTextOptions("") { - Categories = + Categories = { - TextCategory.Hate - }, - BlocklistNames = +TextCategory.Hate +}, + BlocklistNames = { - "" - }, +"" +}, BreakByBlocklists = true, }; -var result = await client.AnalyzeTextAsync(body); -]]> - +Response response = await client.AnalyzeTextAsync(body); +]]> - -This sample shows how to call AnalyzeText with required parameters. + +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeTextOptions body = new AnalyzeTextOptions(""); +Response response = client.AnalyzeText(body); +]]> +This sample shows how to call AnalyzeText with all parameters. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var body = new AnalyzeTextOptions("") +AnalyzeTextOptions body = new AnalyzeTextOptions("") { - Categories = + Categories = { - TextCategory.Hate - }, - BlocklistNames = +TextCategory.Hate +}, + BlocklistNames = { - "" - }, +"" +}, BreakByBlocklists = true, }; -var result = client.AnalyzeText(body); -]]> - +Response response = client.AnalyzeText(body); +]]> - -This sample shows how to call AnalyzeTextAsync with required request content, and how to parse the result. + +This sample shows how to call AnalyzeTextAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - text = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.AnalyzeTextAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["text"] = "", +}); +Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call AnalyzeTextAsync with all request content, and how to parse the result. +This sample shows how to call AnalyzeTextAsync with all request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var data = new { - text = "", - categories = new[] { - "Hate" - }, - blocklistNames = new[] { - "" - }, - breakByBlocklists = true, -}; - -Response response = await client.AnalyzeTextAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["text"] = "", + ["categories"] = new List() +{ +"Hate" +}, + ["blocklistNames"] = new List() +{ +"" +}, + ["breakByBlocklists"] = true, +}); +Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); @@ -99,44 +117,45 @@ Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToS Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); -]]> - +]]> - -This sample shows how to call AnalyzeText with required request content, and how to parse the result. + +This sample shows how to call AnalyzeText and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var data = new { - text = "", -}; - -Response response = client.AnalyzeText(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["text"] = "", +}); +Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call AnalyzeText with all request content, and how to parse the result. +This sample shows how to call AnalyzeText with all request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - text = "", - categories = new[] { - "Hate" - }, - blocklistNames = new[] { - "" - }, - breakByBlocklists = true, -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = client.AnalyzeText(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["text"] = "", + ["categories"] = new List() +{ +"Hate" +}, + ["blocklistNames"] = new List() +{ +"" +}, + ["breakByBlocklists"] = true, +}); +Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); @@ -152,89 +171,106 @@ Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToS Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); -]]> - +]]> - -This sample shows how to call AnalyzeImageAsync with required parameters. + +This sample shows how to call AnalyzeImageAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData()); +Response response = await client.AnalyzeImageAsync(body); +]]> +This sample shows how to call AnalyzeImageAsync with all parameters. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var body = new AnalyzeImageOptions(new ContentSafetyImageData() +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() { - Content = BinaryData.FromString(""), + Content = BinaryData.FromObjectAsJson(new Dictionary()), BlobUrl = new Uri("http://localhost:3000"), }) { - Categories = + Categories = { - ImageCategory.Hate - }, +ImageCategory.Hate +}, }; -var result = await client.AnalyzeImageAsync(body); -]]> - +Response response = await client.AnalyzeImageAsync(body); +]]> - -This sample shows how to call AnalyzeImage with required parameters. + +This sample shows how to call AnalyzeImage. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData()); +Response response = client.AnalyzeImage(body); +]]> +This sample shows how to call AnalyzeImage with all parameters. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var body = new AnalyzeImageOptions(new ContentSafetyImageData() +AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() { - Content = BinaryData.FromString(""), + Content = BinaryData.FromObjectAsJson(new Dictionary()), BlobUrl = new Uri("http://localhost:3000"), }) { - Categories = + Categories = { - ImageCategory.Hate - }, +ImageCategory.Hate +}, }; -var result = client.AnalyzeImage(body); -]]> - +Response response = client.AnalyzeImage(body); +]]> - -This sample shows how to call AnalyzeImageAsync with required request content, and how to parse the result. + +This sample shows how to call AnalyzeImageAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - image = new {}, -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.AnalyzeImageAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["image"] = new Dictionary(), +}); +Response response = await client.AnalyzeImageAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call AnalyzeImageAsync with all request content, and how to parse the result. +This sample shows how to call AnalyzeImageAsync with all request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var data = new { - image = new { - content = new {}, - blobUrl = "http://localhost:3000", - }, - categories = new[] { - "Hate" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["image"] = new Dictionary() + { + ["content"] = new Dictionary(), + ["blobUrl"] = "http://localhost:3000", }, -}; - -Response response = await client.AnalyzeImageAsync(RequestContent.Create(data)); + ["categories"] = new List() +{ +"Hate" +}, +}); +Response response = await client.AnalyzeImageAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); @@ -245,43 +281,44 @@ Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToS Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); -]]> - +]]> - -This sample shows how to call AnalyzeImage with required request content, and how to parse the result. + +This sample shows how to call AnalyzeImage and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - image = new {}, -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = client.AnalyzeImage(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["image"] = new Dictionary(), +}); +Response response = client.AnalyzeImage(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call AnalyzeImage with all request content, and how to parse the result. +This sample shows how to call AnalyzeImage with all request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var data = new { - image = new { - content = new {}, - blobUrl = "http://localhost:3000", - }, - categories = new[] { - "Hate" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["image"] = new Dictionary() + { + ["content"] = new Dictionary(), + ["blobUrl"] = "http://localhost:3000", }, -}; - -Response response = client.AnalyzeImage(RequestContent.Create(data)); + ["categories"] = new List() +{ +"Hate" +}, +}); +Response response = client.AnalyzeImage(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); @@ -292,506 +329,795 @@ Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToS Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); -]]> - +]]> - -This sample shows how to call GetTextBlocklistAsync with required parameters. + +This sample shows how to call GetTextBlocklistAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var result = await client.GetTextBlocklistAsync(""); +Response response = await client.GetTextBlocklistAsync(""); ]]> - +This sample shows how to call GetTextBlocklistAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistAsync(""); +]]> - -This sample shows how to call GetTextBlocklist with required parameters. + +This sample shows how to call GetTextBlocklist. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var result = client.GetTextBlocklist(""); +Response response = client.GetTextBlocklist(""); ]]> - +This sample shows how to call GetTextBlocklist with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklist(""); +]]> - -This sample shows how to call GetTextBlocklistAsync with required parameters and parse the result. + +This sample shows how to call GetTextBlocklistAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.GetTextBlocklistAsync("", new RequestContext()); +Response response = await client.GetTextBlocklistAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> - +This sample shows how to call GetTextBlocklistAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blocklistName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +]]> - -This sample shows how to call GetTextBlocklist with required parameters and parse the result. + +This sample shows how to call GetTextBlocklist and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = client.GetTextBlocklist("", new RequestContext()); +Response response = client.GetTextBlocklist("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); ]]> - +This sample shows how to call GetTextBlocklist with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklist("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blocklistName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +]]> - -This sample shows how to call CreateOrUpdateTextBlocklistAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdateTextBlocklistAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - blocklistName = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blocklistName"] = "", +}); +Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); ]]> -This sample shows how to call CreateOrUpdateTextBlocklistAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateTextBlocklistAsync with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - blocklistName = "", - description = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blocklistName"] = "", + ["description"] = "", +}); +Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateTextBlocklist with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdateTextBlocklist and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var data = new { - blocklistName = "", -}; - -Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blocklistName"] = "", +}); +Response response = client.CreateOrUpdateTextBlocklist("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); ]]> -This sample shows how to call CreateOrUpdateTextBlocklist with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateTextBlocklist with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - blocklistName = "", - description = "", -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blocklistName"] = "", + ["description"] = "", +}); +Response response = client.CreateOrUpdateTextBlocklist("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); -]]> - +]]> - -This sample shows how to call DeleteTextBlocklistAsync with required parameters. + +This sample shows how to call DeleteTextBlocklistAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = await client.DeleteTextBlocklistAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTextBlocklistAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.DeleteTextBlocklistAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTextBlocklist with required parameters. + +This sample shows how to call DeleteTextBlocklist. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = client.DeleteTextBlocklist(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTextBlocklist with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.DeleteTextBlocklist(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AddBlockItemsAsync with required parameters. + +This sample shows how to call AddBlockItemsAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() { - new TextBlockItemInfo("") -{ - Description = "", - } +new TextBlockItemInfo("") }); -var result = await client.AddBlockItemsAsync("", addBlockItemsOptions); +Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); ]]> - +This sample shows how to call AddBlockItemsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +{ +new TextBlockItemInfo("") +{ +Description = "", +} +}); +Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); +]]> - -This sample shows how to call AddBlockItems with required parameters. + +This sample shows how to call AddBlockItems. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] -{ - new TextBlockItemInfo("") +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() { - Description = "", - } +new TextBlockItemInfo("") }); -var result = client.AddBlockItems("", addBlockItemsOptions); +Response response = client.AddBlockItems("", addBlockItemsOptions); ]]> - +This sample shows how to call AddBlockItems with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +{ +new TextBlockItemInfo("") +{ +Description = "", +} +}); +Response response = client.AddBlockItems("", addBlockItemsOptions); +]]> - -This sample shows how to call AddBlockItemsAsync with required parameters and request content and parse the result. -"); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - blockItems = new[] { - new { - description = "", - text = "", - } - }, -}; + +This sample shows how to call AddBlockItemsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.AddBlockItemsAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +} +}, +}); +Response response = await client.AddBlockItemsAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AddBlockItemsAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItems"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["text"] = "", +} +}, +}); +Response response = await client.AddBlockItemsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); -]]> - +]]> - -This sample shows how to call AddBlockItems with required parameters and request content and parse the result. -"); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - blockItems = new[] { - new { - description = "", - text = "", - } - }, -}; + +This sample shows how to call AddBlockItems and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = client.AddBlockItems("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +} +}, +}); +Response response = client.AddBlockItems("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AddBlockItems with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItems"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["text"] = "", +} +}, +}); +Response response = client.AddBlockItems("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); -]]> - +]]> - -This sample shows how to call RemoveBlockItemsAsync with required parameters. + +This sample shows how to call RemoveBlockItemsAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() { - "" +"" }); -var result = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); +Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); +Console.WriteLine(response.Status); ]]> - +This sample shows how to call RemoveBlockItemsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() +{ +"" +}); +Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call RemoveBlockItems with required parameters. + +This sample shows how to call RemoveBlockItems. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() { - "" +"" }); -var result = client.RemoveBlockItems("", removeBlockItemsOptions); +Response response = client.RemoveBlockItems("", removeBlockItemsOptions); +Console.WriteLine(response.Status); ]]> - +This sample shows how to call RemoveBlockItems with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() +{ +"" +}); +Response response = client.RemoveBlockItems("", removeBlockItemsOptions); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call RemoveBlockItemsAsync with required parameters and request content. + +This sample shows how to call RemoveBlockItemsAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - blockItemIds = new[] { - "" - }, -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.RemoveBlockItemsAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItemIds"] = new List() +{ +"" +}, +}); +Response response = await client.RemoveBlockItemsAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call RemoveBlockItemsAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItemIds"] = new List() +{ +"" +}, +}); +Response response = await client.RemoveBlockItemsAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call RemoveBlockItems with required parameters and request content. + +This sample shows how to call RemoveBlockItems. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); - -var data = new { - blockItemIds = new[] { - "" - }, -}; +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = client.RemoveBlockItems("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItemIds"] = new List() +{ +"" +}, +}); +Response response = client.RemoveBlockItems("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call RemoveBlockItems with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["blockItemIds"] = new List() +{ +"" +}, +}); +Response response = client.RemoveBlockItems("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetTextBlocklistItemAsync with required parameters. + +This sample shows how to call GetTextBlocklistItemAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var result = await client.GetTextBlocklistItemAsync("", ""); +Response response = await client.GetTextBlocklistItemAsync("", ""); ]]> - +This sample shows how to call GetTextBlocklistItemAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistItemAsync("", ""); +]]> - -This sample shows how to call GetTextBlocklistItem with required parameters. + +This sample shows how to call GetTextBlocklistItem. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -var result = client.GetTextBlocklistItem("", ""); +Response response = client.GetTextBlocklistItem("", ""); ]]> - +This sample shows how to call GetTextBlocklistItem with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklistItem("", ""); +]]> - -This sample shows how to call GetTextBlocklistItemAsync with required parameters and parse the result. + +This sample shows how to call GetTextBlocklistItemAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = await client.GetTextBlocklistItemAsync("", "", new RequestContext()); +Response response = await client.GetTextBlocklistItemAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); ]]> - +This sample shows how to call GetTextBlocklistItemAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistItemAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("text").ToString()); +]]> - -This sample shows how to call GetTextBlocklistItem with required parameters and parse the result. + +This sample shows how to call GetTextBlocklistItem and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -Response response = client.GetTextBlocklistItem("", "", new RequestContext()); +Response response = client.GetTextBlocklistItem("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); -Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("text").ToString()); ]]> - +This sample shows how to call GetTextBlocklistItem with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklistItem("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("text").ToString()); +]]> - + This sample shows how to call GetTextBlocklistsAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -await foreach (var item in client.GetTextBlocklistsAsync()) +await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) { } ]]> - +This sample shows how to call GetTextBlocklistsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) +{ +} +]]> - + This sample shows how to call GetTextBlocklists. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -foreach (var item in client.GetTextBlocklists()) +foreach (TextBlocklist item in client.GetTextBlocklists()) { } ]]> - +This sample shows how to call GetTextBlocklists with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +foreach (TextBlocklist item in client.GetTextBlocklists()) +{ +} +]]> - -This sample shows how to call GetTextBlocklistsAsync with required parameters and parse the result. + +This sample shows how to call GetTextBlocklistsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -await foreach (var item in client.GetTextBlocklistsAsync(new RequestContext())) +await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); } ]]> - +This sample shows how to call GetTextBlocklistsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); +} +]]> - -This sample shows how to call GetTextBlocklists with required parameters and parse the result. + +This sample shows how to call GetTextBlocklists and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -foreach (var item in client.GetTextBlocklists(new RequestContext())) +foreach (BinaryData item in client.GetTextBlocklists(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); } ]]> - +This sample shows how to call GetTextBlocklists with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +foreach (BinaryData item in client.GetTextBlocklists(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); +} +]]> - -This sample shows how to call GetTextBlocklistItemsAsync with required parameters. + +This sample shows how to call GetTextBlocklistItemsAsync. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234)) +await foreach (TextBlockItem item in client.GetTextBlocklistItemsAsync("")) { } ]]> - +This sample shows how to call GetTextBlocklistItemsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +await foreach (TextBlockItem item in client.GetTextBlocklistItemsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> - -This sample shows how to call GetTextBlocklistItems with required parameters. + +This sample shows how to call GetTextBlocklistItems. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234)) +foreach (TextBlockItem item in client.GetTextBlocklistItems("")) { } ]]> - +This sample shows how to call GetTextBlocklistItems with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +foreach (TextBlockItem item in client.GetTextBlocklistItems("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> - -This sample shows how to call GetTextBlocklistItemsAsync with required parameters and parse the result. + +This sample shows how to call GetTextBlocklistItemsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, new RequestContext())) +await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blockItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); } ]]> - +This sample shows how to call GetTextBlocklistItemsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); +} +]]> - -This sample shows how to call GetTextBlocklistItems with required parameters and parse the result. + +This sample shows how to call GetTextBlocklistItems and parse the result. "); -var endpoint = new Uri(""); -var client = new ContentSafetyClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234, new RequestContext())) +foreach (BinaryData item in client.GetTextBlocklistItems("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blockItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); } ]]> - +This sample shows how to call GetTextBlocklistItems with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +foreach (BinaryData item in client.GetTextBlocklistItems("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs index 84d064d776a3..3fc10cc3ae52 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.AI.ContentSafety; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,16 +23,15 @@ public class Samples_ContentSafetyClient [Ignore("Only validating compilation of examples")] public void Example_AnalyzeText() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - text = "", - }; - - Response response = client.AnalyzeText(RequestContent.Create(data)); + ["text"] = "", + }); + Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -42,23 +41,24 @@ public void Example_AnalyzeText() [Ignore("Only validating compilation of examples")] public void Example_AnalyzeText_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - text = "", - categories = new[] { - "Hate" - }, - blocklistNames = new[] { - "" - }, - breakByBlocklists = true, - }; - - Response response = client.AnalyzeText(RequestContent.Create(data)); + ["text"] = "", + ["categories"] = new List() +{ +"Hate" +}, + ["blocklistNames"] = new List() +{ +"" +}, + ["breakByBlocklists"] = true, + }); + Response response = client.AnalyzeText(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); @@ -78,18 +78,52 @@ public void Example_AnalyzeText_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeText_Async() + public void Example_AnalyzeText_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + AnalyzeTextOptions body = new AnalyzeTextOptions(""); + Response response = client.AnalyzeText(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeText_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AnalyzeTextOptions body = new AnalyzeTextOptions("") { - text = "", + Categories = +{ +TextCategory.Hate +}, + BlocklistNames = +{ +"" +}, + BreakByBlocklists = true, }; + Response response = client.AnalyzeText(body); + } - Response response = await client.AnalyzeTextAsync(RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeText_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + RequestContent content = RequestContent.Create(new Dictionary() + { + ["text"] = "", + }); + Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -99,23 +133,24 @@ public async Task Example_AnalyzeText_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeText_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - text = "", - categories = new[] { - "Hate" - }, - blocklistNames = new[] { - "" - }, - breakByBlocklists = true, - }; - - Response response = await client.AnalyzeTextAsync(RequestContent.Create(data)); + ["text"] = "", + ["categories"] = new List() +{ +"Hate" +}, + ["blocklistNames"] = new List() +{ +"" +}, + ["breakByBlocklists"] = true, + }); + Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); @@ -137,39 +172,50 @@ public async Task Example_AnalyzeText_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeText_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AnalyzeTextOptions body = new AnalyzeTextOptions(""); + Response response = await client.AnalyzeTextAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeText_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var body = new AnalyzeTextOptions("") + AnalyzeTextOptions body = new AnalyzeTextOptions("") { Categories = { - TextCategory.Hate - }, +TextCategory.Hate +}, BlocklistNames = { - "" - }, +"" +}, BreakByBlocklists = true, }; - var result = await client.AnalyzeTextAsync(body); + Response response = await client.AnalyzeTextAsync(body); } [Test] [Ignore("Only validating compilation of examples")] public void Example_AnalyzeImage() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - image = new { }, - }; - - Response response = client.AnalyzeImage(RequestContent.Create(data)); + ["image"] = new Dictionary(), + }); + Response response = client.AnalyzeImage(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -179,23 +225,23 @@ public void Example_AnalyzeImage() [Ignore("Only validating compilation of examples")] public void Example_AnalyzeImage_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - image = new + ["image"] = new Dictionary() { - content = new { }, - blobUrl = "http://localhost:3000", + ["content"] = new Dictionary(), + ["blobUrl"] = "http://localhost:3000", }, - categories = new[] { - "Hate" - }, - }; - - Response response = client.AnalyzeImage(RequestContent.Create(data)); + ["categories"] = new List() +{ +"Hate" +}, + }); + Response response = client.AnalyzeImage(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); @@ -210,18 +256,51 @@ public void Example_AnalyzeImage_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeImage_Async() + public void Example_AnalyzeImage_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData()); + Response response = client.AnalyzeImage(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeImage_AllParameters_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() + { + Content = BinaryData.FromObjectAsJson(new Dictionary()), + BlobUrl = new Uri("http://localhost:3000"), + }) { - image = new { }, + Categories = +{ +ImageCategory.Hate +}, }; + Response response = client.AnalyzeImage(body); + } - Response response = await client.AnalyzeImageAsync(RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeImage_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + RequestContent content = RequestContent.Create(new Dictionary() + { + ["image"] = new Dictionary(), + }); + Response response = await client.AnalyzeImageAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -231,23 +310,23 @@ public async Task Example_AnalyzeImage_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeImage_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - image = new + ["image"] = new Dictionary() { - content = new { }, - blobUrl = "http://localhost:3000", + ["content"] = new Dictionary(), + ["blobUrl"] = "http://localhost:3000", }, - categories = new[] { - "Hate" - }, - }; - - Response response = await client.AnalyzeImageAsync(RequestContent.Create(data)); + ["categories"] = new List() +{ +"Hate" +}, + }); + Response response = await client.AnalyzeImageAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); @@ -264,33 +343,45 @@ public async Task Example_AnalyzeImage_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AnalyzeImage_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var body = new AnalyzeImageOptions(new ContentSafetyImageData() + AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData()); + Response response = await client.AnalyzeImageAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeImage_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AnalyzeImageOptions body = new AnalyzeImageOptions(new ContentSafetyImageData() { - Content = BinaryData.FromString(""), + Content = BinaryData.FromObjectAsJson(new Dictionary()), BlobUrl = new Uri("http://localhost:3000"), }) { Categories = { - ImageCategory.Hate - }, +ImageCategory.Hate +}, }; - var result = await client.AnalyzeImageAsync(body); + Response response = await client.AnalyzeImageAsync(body); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklist() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = client.GetTextBlocklist("", new RequestContext()); + Response response = client.GetTextBlocklist("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -300,26 +391,48 @@ public void Example_GetTextBlocklist() [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklist_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = client.GetTextBlocklist("", new RequestContext()); + Response response = client.GetTextBlocklist("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklist_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklist(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklist_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklist(""); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklist_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = await client.GetTextBlocklistAsync("", new RequestContext()); + Response response = await client.GetTextBlocklistAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -329,11 +442,11 @@ public async Task Example_GetTextBlocklist_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklist_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = await client.GetTextBlocklistAsync("", new RequestContext()); + Response response = await client.GetTextBlocklistAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -344,27 +457,37 @@ public async Task Example_GetTextBlocklist_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklist_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.GetTextBlocklistAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklist_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var result = await client.GetTextBlocklistAsync(""); + Response response = await client.GetTextBlocklistAsync(""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateTextBlocklist() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blocklistName = "", - }; - - Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data)); + ["blocklistName"] = "", + }); + Response response = client.CreateOrUpdateTextBlocklist("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -374,17 +497,16 @@ public void Example_CreateOrUpdateTextBlocklist() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateTextBlocklist_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blocklistName = "", - description = "", - }; - - Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data)); + ["blocklistName"] = "", + ["description"] = "", + }); + Response response = client.CreateOrUpdateTextBlocklist("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -395,16 +517,15 @@ public void Example_CreateOrUpdateTextBlocklist_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateTextBlocklist_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blocklistName = "", - }; - - Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data)); + ["blocklistName"] = "", + }); + Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -414,17 +535,16 @@ public async Task Example_CreateOrUpdateTextBlocklist_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateTextBlocklist_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blocklistName = "", - description = "", - }; - - Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data)); + ["blocklistName"] = "", + ["description"] = "", + }); + Response response = await client.CreateOrUpdateTextBlocklistAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blocklistName").ToString()); @@ -435,9 +555,9 @@ public async Task Example_CreateOrUpdateTextBlocklist_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteTextBlocklist() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = client.DeleteTextBlocklist(""); Console.WriteLine(response.Status); @@ -447,9 +567,9 @@ public void Example_DeleteTextBlocklist() [Ignore("Only validating compilation of examples")] public void Example_DeleteTextBlocklist_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = client.DeleteTextBlocklist(""); Console.WriteLine(response.Status); @@ -459,9 +579,9 @@ public void Example_DeleteTextBlocklist_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTextBlocklist_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = await client.DeleteTextBlocklistAsync(""); Console.WriteLine(response.Status); @@ -471,9 +591,9 @@ public async Task Example_DeleteTextBlocklist_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTextBlocklist_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); Response response = await client.DeleteTextBlocklistAsync(""); Console.WriteLine(response.Status); @@ -483,20 +603,21 @@ public async Task Example_DeleteTextBlocklist_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddBlockItems() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blockItems = new[] { - new { - text = "", - } - }, - }; - - Response response = client.AddBlockItems("", RequestContent.Create(data)); + ["blockItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +} +}, + }); + Response response = client.AddBlockItems("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -506,21 +627,22 @@ public void Example_AddBlockItems() [Ignore("Only validating compilation of examples")] public void Example_AddBlockItems_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blockItems = new[] { - new { - description = "", - text = "", - } - }, - }; - - Response response = client.AddBlockItems("", RequestContent.Create(data)); + ["blockItems"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["text"] = "", +} +}, + }); + Response response = client.AddBlockItems("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); @@ -530,22 +652,56 @@ public void Example_AddBlockItems_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AddBlockItems_Async() + public void Example_AddBlockItems_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new - { - blockItems = new[] { - new { - text = "", + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +{ +new TextBlockItemInfo("") +}); + Response response = client.AddBlockItems("", addBlockItemsOptions); } - }, - }; - Response response = await client.AddBlockItemsAsync("", RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddBlockItems_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +{ +new TextBlockItemInfo("") +{ +Description = "", +} +}); + Response response = client.AddBlockItems("", addBlockItemsOptions); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddBlockItems_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + RequestContent content = RequestContent.Create(new Dictionary() + { + ["blockItems"] = new List() +{ +new Dictionary() +{ +["text"] = "", +} +}, + }); + Response response = await client.AddBlockItemsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -555,21 +711,22 @@ public async Task Example_AddBlockItems_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddBlockItems_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blockItems = new[] { - new { - description = "", - text = "", - } - }, - }; - - Response response = await client.AddBlockItemsAsync("", RequestContent.Create(data)); + ["blockItems"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["text"] = "", +} +}, + }); + Response response = await client.AddBlockItemsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); @@ -581,36 +738,51 @@ public async Task Example_AddBlockItems_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddBlockItems_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] - { - new TextBlockItemInfo("") + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() { - Description = "", - } - }); - var result = await client.AddBlockItemsAsync("", addBlockItemsOptions); +new TextBlockItemInfo("") +}); + Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddBlockItems_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AddBlockItemsOptions addBlockItemsOptions = new AddBlockItemsOptions(new List() +{ +new TextBlockItemInfo("") +{ +Description = "", +} +}); + Response response = await client.AddBlockItemsAsync("", addBlockItemsOptions); } [Test] [Ignore("Only validating compilation of examples")] public void Example_RemoveBlockItems() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blockItemIds = new[] { - "" - }, - }; - - Response response = client.RemoveBlockItems("", RequestContent.Create(data)); + ["blockItemIds"] = new List() +{ +"" +}, + }); + Response response = client.RemoveBlockItems("", content); Console.WriteLine(response.Status); } @@ -618,18 +790,50 @@ public void Example_RemoveBlockItems() [Ignore("Only validating compilation of examples")] public void Example_RemoveBlockItems_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blockItemIds = new[] { - "" - }, - }; + ["blockItemIds"] = new List() +{ +"" +}, + }); + Response response = client.RemoveBlockItems("", content); + Console.WriteLine(response.Status); + } - Response response = client.RemoveBlockItems("", RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RemoveBlockItems_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() +{ +"" +}); + Response response = client.RemoveBlockItems("", removeBlockItemsOptions); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RemoveBlockItems_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() +{ +"" +}); + Response response = client.RemoveBlockItems("", removeBlockItemsOptions); Console.WriteLine(response.Status); } @@ -637,18 +841,18 @@ public void Example_RemoveBlockItems_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_RemoveBlockItems_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blockItemIds = new[] { - "" - }, - }; - - Response response = await client.RemoveBlockItemsAsync("", RequestContent.Create(data)); + ["blockItemIds"] = new List() +{ +"" +}, + }); + Response response = await client.RemoveBlockItemsAsync("", content); Console.WriteLine(response.Status); } @@ -656,18 +860,18 @@ public async Task Example_RemoveBlockItems_Async() [Ignore("Only validating compilation of examples")] public async Task Example_RemoveBlockItems_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - blockItemIds = new[] { - "" - }, - }; - - Response response = await client.RemoveBlockItemsAsync("", RequestContent.Create(data)); + ["blockItemIds"] = new List() +{ +"" +}, + }); + Response response = await client.RemoveBlockItemsAsync("", content); Console.WriteLine(response.Status); } @@ -675,26 +879,43 @@ public async Task Example_RemoveBlockItems_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_RemoveBlockItems_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] - { - "" - }); - var result = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() +{ +"" +}); + Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RemoveBlockItems_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + RemoveBlockItemsOptions removeBlockItemsOptions = new RemoveBlockItemsOptions(new List() +{ +"" +}); + Response response = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklistItem() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = client.GetTextBlocklistItem("", "", new RequestContext()); + Response response = client.GetTextBlocklistItem("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); @@ -705,11 +926,11 @@ public void Example_GetTextBlocklistItem() [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklistItem_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = client.GetTextBlocklistItem("", "", new RequestContext()); + Response response = client.GetTextBlocklistItem("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); @@ -717,15 +938,37 @@ public void Example_GetTextBlocklistItem_AllParameters() Console.WriteLine(result.GetProperty("text").ToString()); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItem_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklistItem("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItem_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklistItem("", ""); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklistItem_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = await client.GetTextBlocklistItemAsync("", "", new RequestContext()); + Response response = await client.GetTextBlocklistItemAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); @@ -736,11 +979,11 @@ public async Task Example_GetTextBlocklistItem_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklistItem_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - Response response = await client.GetTextBlocklistItemAsync("", "", new RequestContext()); + Response response = await client.GetTextBlocklistItemAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("blockItemId").ToString()); @@ -752,25 +995,36 @@ public async Task Example_GetTextBlocklistItem_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklistItem_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.GetTextBlocklistItemAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItem_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - var result = await client.GetTextBlocklistItemAsync("", ""); + Response response = await client.GetTextBlocklistItemAsync("", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklists() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - foreach (var item in client.GetTextBlocklists(new RequestContext())) + foreach (BinaryData item in client.GetTextBlocklists(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); } } @@ -778,15 +1032,41 @@ public void Example_GetTextBlocklists() [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklists_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - foreach (var item in client.GetTextBlocklists(new RequestContext())) + foreach (BinaryData item in client.GetTextBlocklists(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklists_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + foreach (TextBlocklist item in client.GetTextBlocklists()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklists_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + foreach (TextBlocklist item in client.GetTextBlocklists()) + { } } @@ -794,14 +1074,14 @@ public void Example_GetTextBlocklists_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklists_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - await foreach (var item in client.GetTextBlocklistsAsync(new RequestContext())) + await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); } } @@ -809,15 +1089,15 @@ public async Task Example_GetTextBlocklists_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklists_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - await foreach (var item in client.GetTextBlocklistsAsync(new RequestContext())) + await foreach (BinaryData item in client.GetTextBlocklistsAsync(null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blocklistName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("blocklistName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); } } @@ -825,11 +1105,24 @@ public async Task Example_GetTextBlocklists_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklists_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklists_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - await foreach (var item in client.GetTextBlocklistsAsync()) + await foreach (TextBlocklist item in client.GetTextBlocklistsAsync()) { } } @@ -838,15 +1131,15 @@ public async Task Example_GetTextBlocklists_Convenience_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklistItems() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234, new RequestContext())) + foreach (BinaryData item in client.GetTextBlocklistItems("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blockItemId").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); } } @@ -854,16 +1147,42 @@ public void Example_GetTextBlocklistItems() [Ignore("Only validating compilation of examples")] public void Example_GetTextBlocklistItems_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234, new RequestContext())) + foreach (BinaryData item in client.GetTextBlocklistItems("", 1234, 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blockItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItems_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + foreach (TextBlockItem item in client.GetTextBlocklistItems("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItems_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + foreach (TextBlockItem item in client.GetTextBlocklistItems("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { } } @@ -871,15 +1190,15 @@ public void Example_GetTextBlocklistItems_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklistItems_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, new RequestContext())) + await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blockItemId").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); } } @@ -887,16 +1206,16 @@ public async Task Example_GetTextBlocklistItems_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklistItems_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, new RequestContext())) + await foreach (BinaryData item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("blockItemId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("text").ToString()); } } @@ -904,11 +1223,24 @@ public async Task Example_GetTextBlocklistItems_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTextBlocklistItems_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ContentSafetyClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + await foreach (TextBlockItem item in client.GetTextBlocklistItemsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItems_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234)) + await foreach (TextBlockItem item in client.GetTextBlocklistItemsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) { } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml index d3a18ad5e79a..ccf11796cdff 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevBoxesClient.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetPoolAsync with required parameters and parse the result. + +This sample shows how to call GetPoolAsync and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = await client.GetPoolAsync("", new RequestContext()); +Response response = await client.GetPoolAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPoolAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = await client.GetPoolAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -26,18 +37,28 @@ Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSys Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -]]> - +]]> - -This sample shows how to call GetPool with required parameters and parse the result. + +This sample shows how to call GetPool and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = client.GetPool("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPool with all parameters and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = client.GetPool("", new RequestContext()); +Response response = client.GetPool("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -54,18 +75,28 @@ Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSys Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -]]> - +]]> - -This sample shows how to call GetScheduleByPoolAsync with required parameters and parse the result. + +This sample shows how to call GetScheduleByPoolAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = await client.GetScheduleByPoolAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetScheduleByPoolAsync with all parameters and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = await client.GetScheduleByPoolAsync("", "", new RequestContext()); +Response response = await client.GetScheduleByPoolAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -73,18 +104,28 @@ Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("frequency").ToString()); Console.WriteLine(result.GetProperty("time").ToString()); Console.WriteLine(result.GetProperty("timeZone").ToString()); -]]> - +]]> - -This sample shows how to call GetScheduleByPool with required parameters and parse the result. + +This sample shows how to call GetScheduleByPool and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = client.GetScheduleByPool("", "", new RequestContext()); +Response response = client.GetScheduleByPool("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetScheduleByPool with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = client.GetScheduleByPool("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -92,18 +133,28 @@ Console.WriteLine(result.GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("frequency").ToString()); Console.WriteLine(result.GetProperty("time").ToString()); Console.WriteLine(result.GetProperty("timeZone").ToString()); -]]> - +]]> - -This sample shows how to call GetDevBoxByUserAsync with required parameters and parse the result. + +This sample shows how to call GetDevBoxByUserAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = await client.GetDevBoxByUserAsync("me", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("poolName").ToString()); +]]> +This sample shows how to call GetDevBoxByUserAsync with all parameters and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = await client.GetDevBoxByUserAsync("", "", new RequestContext()); +Response response = await client.GetDevBoxByUserAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -130,18 +181,28 @@ Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumbe Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -]]> - +]]> - -This sample shows how to call GetDevBoxByUser with required parameters and parse the result. + +This sample shows how to call GetDevBoxByUser and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = client.GetDevBoxByUser("", "", new RequestContext()); +Response response = client.GetDevBoxByUser("me", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("poolName").ToString()); +]]> +This sample shows how to call GetDevBoxByUser with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = client.GetDevBoxByUser("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -168,50 +229,80 @@ Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumbe Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -]]> - +]]> - -This sample shows how to call GetRemoteConnectionAsync with required parameters and parse the result. + +This sample shows how to call GetRemoteConnectionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = await client.GetRemoteConnectionAsync("me", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRemoteConnectionAsync with all parameters and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = await client.GetRemoteConnectionAsync("", "", new RequestContext()); +Response response = await client.GetRemoteConnectionAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("webUrl").ToString()); Console.WriteLine(result.GetProperty("rdpConnectionUrl").ToString()); -]]> - +]]> - -This sample shows how to call GetRemoteConnection with required parameters and parse the result. + +This sample shows how to call GetRemoteConnection and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = client.GetRemoteConnection("me", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRemoteConnection with all parameters and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = client.GetRemoteConnection("", "", new RequestContext()); +Response response = client.GetRemoteConnection("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("webUrl").ToString()); Console.WriteLine(result.GetProperty("rdpConnectionUrl").ToString()); -]]> - +]]> - -This sample shows how to call GetUpcomingActionAsync with required parameters and parse the result. + +This sample shows how to call GetUpcomingActionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = await client.GetUpcomingActionAsync("me", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetUpcomingActionAsync with all parameters and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = await client.GetUpcomingActionAsync("", "", "", new RequestContext()); +Response response = await client.GetUpcomingActionAsync("me", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -220,18 +311,28 @@ Console.WriteLine(result.GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("scheduledTime").ToString()); Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> - +]]> - -This sample shows how to call GetUpcomingAction with required parameters and parse the result. + +This sample shows how to call GetUpcomingAction and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = client.GetUpcomingAction("", "", "", new RequestContext()); +Response response = client.GetUpcomingAction("me", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetUpcomingAction with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = client.GetUpcomingAction("me", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -240,44 +341,70 @@ Console.WriteLine(result.GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("scheduledTime").ToString()); Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> - +]]> - -This sample shows how to call SkipUpcomingActionAsync with required parameters. + +This sample shows how to call SkipUpcomingActionAsync. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = await client.SkipUpcomingActionAsync("", "", ""); +Response response = await client.SkipUpcomingActionAsync("me", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call SkipUpcomingActionAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = await client.SkipUpcomingActionAsync("me", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call SkipUpcomingAction with required parameters. + +This sample shows how to call SkipUpcomingAction. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = client.SkipUpcomingAction("", "", ""); +Response response = client.SkipUpcomingAction("me", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call SkipUpcomingAction with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = client.SkipUpcomingAction("me", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DelayUpcomingActionAsync with required parameters and parse the result. + +This sample shows how to call DelayUpcomingActionAsync and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = await client.DelayUpcomingActionAsync("", "", "", DateTimeOffset.UtcNow, new RequestContext()); +Response response = await client.DelayUpcomingActionAsync("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DelayUpcomingActionAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = await client.DelayUpcomingActionAsync("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -286,18 +413,28 @@ Console.WriteLine(result.GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("scheduledTime").ToString()); Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> - +]]> - -This sample shows how to call DelayUpcomingAction with required parameters and parse the result. + +This sample shows how to call DelayUpcomingAction and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Response response = client.DelayUpcomingAction("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DelayUpcomingAction with all parameters and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Response response = client.DelayUpcomingAction("", "", "", DateTimeOffset.UtcNow, new RequestContext()); +Response response = client.DelayUpcomingAction("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -306,259 +443,346 @@ Console.WriteLine(result.GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("scheduledTime").ToString()); Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); Console.WriteLine(result.GetProperty("sourceId").ToString()); -]]> - +]]> - -This sample shows how to call GetPoolsAsync with required parameters and parse the result. + +This sample shows how to call GetPoolsAsync and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -await foreach (var item in client.GetPoolsAsync(1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetPoolsAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPoolsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetPoolsAsync(1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> - -This sample shows how to call GetPools with required parameters and parse the result. + +This sample shows how to call GetPools and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -foreach (var item in client.GetPools(1234, "", new RequestContext())) +foreach (BinaryData item in client.GetPools(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetPools with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetPools(1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> - -This sample shows how to call GetSchedulesByPoolAsync with required parameters and parse the result. + +This sample shows how to call GetSchedulesByPoolAsync and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -await foreach (var item in client.GetSchedulesByPoolAsync("", 1234, "", new RequestContext())) +await foreach (BinaryData item in client.GetSchedulesByPoolAsync("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSchedulesByPoolAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetSchedulesByPoolAsync("", 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("frequency").ToString()); + Console.WriteLine(result[0].GetProperty("time").ToString()); + Console.WriteLine(result[0].GetProperty("timeZone").ToString()); +} +]]> - -This sample shows how to call GetSchedulesByPool with required parameters and parse the result. + +This sample shows how to call GetSchedulesByPool and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -foreach (var item in client.GetSchedulesByPool("", 1234, "", new RequestContext())) +foreach (BinaryData item in client.GetSchedulesByPool("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetSchedulesByPool with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetSchedulesByPool("", 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("frequency").ToString()); + Console.WriteLine(result[0].GetProperty("time").ToString()); + Console.WriteLine(result[0].GetProperty("timeZone").ToString()); +} +]]> - -This sample shows how to call GetDevBoxesByUserAsync with required parameters and parse the result. + +This sample shows how to call GetDevBoxesByUserAsync and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -await foreach (var item in client.GetDevBoxesByUserAsync("", "", 1234, new RequestContext())) +await foreach (BinaryData item in client.GetDevBoxesByUserAsync("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } ]]> - +This sample shows how to call GetDevBoxesByUserAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetDevBoxesByUserAsync("me", "", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> - -This sample shows how to call GetDevBoxesByUser with required parameters and parse the result. + +This sample shows how to call GetDevBoxesByUser and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -foreach (var item in client.GetDevBoxesByUser("", "", 1234, new RequestContext())) +foreach (BinaryData item in client.GetDevBoxesByUser("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } ]]> - +This sample shows how to call GetDevBoxesByUser with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetDevBoxesByUser("me", "", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> - -This sample shows how to call GetUpcomingActionsAsync with required parameters and parse the result. + +This sample shows how to call GetUpcomingActionsAsync and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -await foreach (var item in client.GetUpcomingActionsAsync("", "", new RequestContext())) +await foreach (BinaryData item in client.GetUpcomingActionsAsync("me", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetUpcomingActionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetUpcomingActionsAsync("me", "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actionType").ToString()); + Console.WriteLine(result[0].GetProperty("reason").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("originalScheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("sourceId").ToString()); +} +]]> - -This sample shows how to call GetUpcomingActions with required parameters and parse the result. + +This sample shows how to call GetUpcomingActions and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -foreach (var item in client.GetUpcomingActions("", "", new RequestContext())) +foreach (BinaryData item in client.GetUpcomingActions("me", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetUpcomingActions with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetUpcomingActions("me", "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actionType").ToString()); + Console.WriteLine(result[0].GetProperty("reason").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("originalScheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("sourceId").ToString()); +} +]]> - -This sample shows how to call CreateDevBoxAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateDevBoxAsync and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var data = new { - poolName = "", -}; - -var operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["poolName"] = "", +}); +Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolName").ToString()); ]]> -This sample shows how to call CreateDevBoxAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateDevBoxAsync with all parameters and request content and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var data = new { - poolName = "", - localAdministrator = "Enabled", -}; - -var operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["poolName"] = "", + ["localAdministrator"] = "Enabled", +}); +Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -584,41 +808,40 @@ Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumbe Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -]]> - +]]> - -This sample shows how to call CreateDevBox with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateDevBox and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var data = new { - poolName = "", -}; - -var operation = client.CreateDevBox(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["poolName"] = "", +}); +Operation operation = client.CreateDevBox(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolName").ToString()); ]]> -This sample shows how to call CreateDevBox with all parameters and request content, and how to parse the result. +This sample shows how to call CreateDevBox with all parameters and request content and parse the result. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var data = new { - poolName = "", - localAdministrator = "Enabled", -}; - -var operation = client.CreateDevBox(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["poolName"] = "", + ["localAdministrator"] = "Enabled", +}); +Operation operation = client.CreateDevBox(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -644,112 +867,121 @@ Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumbe Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("localAdministrator").ToString()); -]]> - +]]> - -This sample shows how to call DeleteDevBoxAsync with required parameters. + +This sample shows how to call DeleteDevBoxAsync. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "me", ""); ]]> - +This sample shows how to call DeleteDevBoxAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "me", ""); +]]> - -This sample shows how to call DeleteDevBox with required parameters. + +This sample shows how to call DeleteDevBox. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var operation = client.DeleteDevBox(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.DeleteDevBox(WaitUntil.Completed, "me", ""); ]]> - +This sample shows how to call DeleteDevBox with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Operation operation = client.DeleteDevBox(WaitUntil.Completed, "me", ""); +]]> - -This sample shows how to call StartDevBoxAsync with required parameters. + +This sample shows how to call StartDevBoxAsync. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var operation = await client.StartDevBoxAsync(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "me", ""); ]]> - +This sample shows how to call StartDevBoxAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "me", ""); +]]> - -This sample shows how to call StartDevBox with required parameters. + +This sample shows how to call StartDevBox. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -var operation = client.StartDevBox(WaitUntil.Completed, "", ""); - -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.StartDevBox(WaitUntil.Completed, "me", ""); ]]> - +This sample shows how to call StartDevBox with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); + +Operation operation = client.StartDevBox(WaitUntil.Completed, "me", ""); +]]> - -This sample shows how to call StopDevBoxAsync with required parameters. + +This sample shows how to call StopDevBoxAsync. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -var operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", ""); - -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "me", ""); ]]> This sample shows how to call StopDevBoxAsync with all parameters. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", "", true); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); -]]> - +Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "me", "", hibernate: true); +]]> - -This sample shows how to call StopDevBox with required parameters. + +This sample shows how to call StopDevBox. "); -var client = new DevBoxesClient(endpoint, "", credential); - -var operation = client.StopDevBox(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.StopDevBox(WaitUntil.Completed, "me", ""); ]]> This sample shows how to call StopDevBox with all parameters. "); -var client = new DevBoxesClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); -var operation = client.StopDevBox(WaitUntil.Completed, "", "", true); - -Console.WriteLine(operation.GetRawResponse().Status); -]]> - +Operation operation = client.StopDevBox(WaitUntil.Completed, "me", "", hibernate: true); +]]> \ No newline at end of file diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml index 7b289c99e95b..0fc56e0a4cd8 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/DevCenterClient.xml @@ -2,226 +2,312 @@ - -This sample shows how to call GetProjectAsync with required parameters and parse the result. + +This sample shows how to call GetProjectAsync and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -Response response = await client.GetProjectAsync("", new RequestContext()); +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetProjectAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +Response response = await client.GetProjectAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); -]]> - +]]> - -This sample shows how to call GetProject with required parameters and parse the result. + +This sample shows how to call GetProject and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetProject with all parameters and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -Response response = client.GetProject("", new RequestContext()); +Response response = client.GetProject("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); -]]> - +]]> - -This sample shows how to call GetProjectsAsync with required parameters and parse the result. + +This sample shows how to call GetProjectsAsync and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -await foreach (var item in client.GetProjectsAsync("", 1234, new RequestContext())) +await foreach (BinaryData item in client.GetProjectsAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetProjectsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +await foreach (BinaryData item in client.GetProjectsAsync("", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); +} +]]> - -This sample shows how to call GetProjects with required parameters and parse the result. + +This sample shows how to call GetProjects and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -foreach (var item in client.GetProjects("", 1234, new RequestContext())) +foreach (BinaryData item in client.GetProjects(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetProjects with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +foreach (BinaryData item in client.GetProjects("", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); +} +]]> - -This sample shows how to call GetAllDevBoxesAsync with required parameters and parse the result. + +This sample shows how to call GetAllDevBoxesAsync and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -await foreach (var item in client.GetAllDevBoxesAsync("", 1234, new RequestContext())) +await foreach (BinaryData item in client.GetAllDevBoxesAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } ]]> - +This sample shows how to call GetAllDevBoxesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +await foreach (BinaryData item in client.GetAllDevBoxesAsync("", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> - -This sample shows how to call GetAllDevBoxes with required parameters and parse the result. + +This sample shows how to call GetAllDevBoxes and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -foreach (var item in client.GetAllDevBoxes("", 1234, new RequestContext())) +foreach (BinaryData item in client.GetAllDevBoxes(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } ]]> - +This sample shows how to call GetAllDevBoxes with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +foreach (BinaryData item in client.GetAllDevBoxes("", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> - -This sample shows how to call GetAllDevBoxesByUserAsync with required parameters and parse the result. + +This sample shows how to call GetAllDevBoxesByUserAsync and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -await foreach (var item in client.GetAllDevBoxesByUserAsync("", "", 1234, new RequestContext())) +await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } ]]> - +This sample shows how to call GetAllDevBoxesByUserAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", "", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> - -This sample shows how to call GetAllDevBoxesByUser with required parameters and parse the result. + +This sample shows how to call GetAllDevBoxesByUser and parse the result. "); -var client = new DevCenterClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); -foreach (var item in client.GetAllDevBoxesByUser("", "", 1234, new RequestContext())) +foreach (BinaryData item in client.GetAllDevBoxesByUser("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } ]]> - +This sample shows how to call GetAllDevBoxesByUser with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DevCenterClient client = new DevCenterClient(endpoint, credential); + +foreach (BinaryData item in client.GetAllDevBoxesByUser("me", "", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/EnvironmentsClient.xml b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/EnvironmentsClient.xml index 01de740e6fb4..6d060714ae48 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/EnvironmentsClient.xml +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Docs/EnvironmentsClient.xml @@ -2,14 +2,26 @@ - -This sample shows how to call GetEnvironmentByUserAsync with required parameters and parse the result. + +This sample shows how to call GetEnvironmentByUserAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Response response = await client.GetEnvironmentByUserAsync("", "", new RequestContext()); +Response response = await client.GetEnvironmentByUserAsync("me", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("environmentType").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnvironmentByUserAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Response response = await client.GetEnvironmentByUserAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -21,22 +33,33 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> - -This sample shows how to call GetEnvironmentByUser with required parameters and parse the result. + +This sample shows how to call GetEnvironmentByUser and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Response response = client.GetEnvironmentByUser("", "", new RequestContext()); +Response response = client.GetEnvironmentByUser("me", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("environmentType").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnvironmentByUser with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Response response = client.GetEnvironmentByUser("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -48,57 +71,54 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> - -This sample shows how to call UpdateEnvironmentAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call UpdateEnvironmentAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -var data = new { - environmentType = "", -}; - -Response response = await client.UpdateEnvironmentAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateEnvironmentAsync("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateEnvironmentAsync with all parameters and request content, and how to parse the result. -"); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new {}, - scheduledTasks = new { - key = new { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", +This sample shows how to call UpdateEnvironmentAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new { - key = "", + ["tags"] = new Dictionary() + { + ["key"] = "", }, -}; - -Response response = await client.UpdateEnvironmentAsync("", "", RequestContent.Create(data)); +}); +Response response = await client.UpdateEnvironmentAsync("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -110,57 +130,54 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> - -This sample shows how to call UpdateEnvironment with required parameters and request content, and how to parse the result. + +This sample shows how to call UpdateEnvironment and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - environmentType = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Response response = client.UpdateEnvironment("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateEnvironment("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateEnvironment with all parameters and request content, and how to parse the result. -"); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new {}, - scheduledTasks = new { - key = new { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", +This sample shows how to call UpdateEnvironment with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new { - key = "", + ["tags"] = new Dictionary() + { + ["key"] = "", }, -}; - -Response response = client.UpdateEnvironment("", "", RequestContent.Create(data)); +}); +Response response = client.UpdateEnvironment("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -172,56 +189,86 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> - -This sample shows how to call GetCatalogItemAsync with required parameters and parse the result. + +This sample shows how to call GetCatalogItemAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Response response = await client.GetCatalogItemAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCatalogItemAsync with all parameters and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Response response = await client.GetCatalogItemAsync("", new RequestContext()); +Response response = await client.GetCatalogItemAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); -]]> - +]]> - -This sample shows how to call GetCatalogItem with required parameters and parse the result. + +This sample shows how to call GetCatalogItem and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Response response = client.GetCatalogItem("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCatalogItem with all parameters and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Response response = client.GetCatalogItem("", new RequestContext()); +Response response = client.GetCatalogItem("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); -]]> - +]]> - -This sample shows how to call GetCatalogItemVersionAsync with required parameters and parse the result. + +This sample shows how to call GetCatalogItemVersionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Response response = await client.GetCatalogItemVersionAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCatalogItemVersionAsync with all parameters and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Response response = await client.GetCatalogItemVersionAsync("", "", new RequestContext()); +Response response = await client.GetCatalogItemVersionAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("catalogItemId").ToString()); @@ -258,18 +305,28 @@ Console.WriteLine(result.GetProperty("actions")[0].GetProperty("runner").ToStrin Console.WriteLine(result.GetProperty("runner").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("eligibleForLatestVersion").ToString()); -]]> - +]]> - -This sample shows how to call GetCatalogItemVersion with required parameters and parse the result. + +This sample shows how to call GetCatalogItemVersion and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Response response = client.GetCatalogItemVersion("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCatalogItemVersion with all parameters and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Response response = client.GetCatalogItemVersion("", "", new RequestContext()); +Response response = client.GetCatalogItemVersion("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("catalogItemId").ToString()); @@ -306,338 +363,454 @@ Console.WriteLine(result.GetProperty("actions")[0].GetProperty("runner").ToStrin Console.WriteLine(result.GetProperty("runner").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("eligibleForLatestVersion").ToString()); -]]> - +]]> - -This sample shows how to call GetEnvironmentsAsync with required parameters and parse the result. + +This sample shows how to call GetEnvironmentsAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -await foreach (var item in client.GetEnvironmentsAsync(1234, new RequestContext())) +await foreach (BinaryData item in client.GetEnvironmentsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetEnvironmentsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetEnvironmentsAsync(1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetEnvironments with required parameters and parse the result. + +This sample shows how to call GetEnvironments and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -foreach (var item in client.GetEnvironments(1234, new RequestContext())) +foreach (BinaryData item in client.GetEnvironments(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetEnvironments with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetEnvironments(1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetEnvironmentsByUserAsync with required parameters and parse the result. + +This sample shows how to call GetEnvironmentsByUserAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -await foreach (var item in client.GetEnvironmentsByUserAsync("", 1234, new RequestContext())) +await foreach (BinaryData item in client.GetEnvironmentsByUserAsync("me", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetEnvironmentsByUserAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetEnvironmentsByUserAsync("me", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetEnvironmentsByUser with required parameters and parse the result. + +This sample shows how to call GetEnvironmentsByUser and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -foreach (var item in client.GetEnvironmentsByUser("", 1234, new RequestContext())) +foreach (BinaryData item in client.GetEnvironmentsByUser("me", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetEnvironmentsByUser with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetEnvironmentsByUser("me", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); +} +]]> - -This sample shows how to call GetCatalogItemsAsync with required parameters and parse the result. + +This sample shows how to call GetCatalogItemsAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -await foreach (var item in client.GetCatalogItemsAsync(1234, new RequestContext())) +await foreach (BinaryData item in client.GetCatalogItemsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCatalogItemsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetCatalogItemsAsync(1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); +} +]]> - -This sample shows how to call GetCatalogItems with required parameters and parse the result. + +This sample shows how to call GetCatalogItems and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -foreach (var item in client.GetCatalogItems(1234, new RequestContext())) +foreach (BinaryData item in client.GetCatalogItems(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCatalogItems with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetCatalogItems(1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); +} +]]> - -This sample shows how to call GetCatalogItemVersionsAsync with required parameters and parse the result. + +This sample shows how to call GetCatalogItemVersionsAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -await foreach (var item in client.GetCatalogItemVersionsAsync("", 1234, new RequestContext())) +await foreach (BinaryData item in client.GetCatalogItemVersionsAsync("", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("catalogItemId").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("summary").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("eligibleForLatestVersion").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCatalogItemVersionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetCatalogItemVersionsAsync("", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("catalogItemId").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("summary").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("eligibleForLatestVersion").ToString()); +} +]]> - -This sample shows how to call GetCatalogItemVersions with required parameters and parse the result. + +This sample shows how to call GetCatalogItemVersions and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -foreach (var item in client.GetCatalogItemVersions("", 1234, new RequestContext())) +foreach (BinaryData item in client.GetCatalogItemVersions("", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("catalogItemId").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("summary").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("eligibleForLatestVersion").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCatalogItemVersions with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetCatalogItemVersions("", 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("catalogItemId").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("summary").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("eligibleForLatestVersion").ToString()); +} +]]> - -This sample shows how to call GetEnvironmentTypesAsync with required parameters and parse the result. + +This sample shows how to call GetEnvironmentTypesAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -await foreach (var item in client.GetEnvironmentTypesAsync(1234, new RequestContext())) +await foreach (BinaryData item in client.GetEnvironmentTypesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetEnvironmentTypesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetEnvironmentTypesAsync(1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); +} +]]> - -This sample shows how to call GetEnvironmentTypes with required parameters and parse the result. + +This sample shows how to call GetEnvironmentTypes and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -foreach (var item in client.GetEnvironmentTypes(1234, new RequestContext())) +foreach (BinaryData item in client.GetEnvironmentTypes(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetEnvironmentTypes with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetEnvironmentTypes(1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); +} +]]> - -This sample shows how to call CreateOrUpdateEnvironmentAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdateEnvironmentAsync and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - environmentType = "", -}; - -var operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["environmentType"] = "", +}); +Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEnvironmentAsync with all parameters and request content, and how to parse the result. -"); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new {}, - scheduledTasks = new { - key = new { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", +This sample shows how to call CreateOrUpdateEnvironmentAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["environmentType"] = "", + ["user"] = "", + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new { - key = "", + ["tags"] = new Dictionary() + { + ["key"] = "", }, -}; - -var operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - +}); +Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -648,60 +821,62 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> - -This sample shows how to call CreateOrUpdateEnvironment with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateOrUpdateEnvironment and parse the result. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - environmentType = "", -}; - -var operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["environmentType"] = "", +}); +Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEnvironment with all parameters and request content, and how to parse the result. -"); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new {}, - scheduledTasks = new { - key = new { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", +This sample shows how to call CreateOrUpdateEnvironment with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["environmentType"] = "", + ["user"] = "", + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new { - key = "", + ["tags"] = new Dictionary() + { + ["key"] = "", }, -}; - -var operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", RequestContent.Create(data)); - +}); +Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -712,172 +887,161 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); -Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> - -This sample shows how to call DeleteEnvironmentAsync with required parameters. + +This sample shows how to call DeleteEnvironmentAsync. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "me", ""); ]]> - +This sample shows how to call DeleteEnvironmentAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "me", ""); +]]> - -This sample shows how to call DeleteEnvironment with required parameters. + +This sample shows how to call DeleteEnvironment. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var operation = client.DeleteEnvironment(WaitUntil.Completed, "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "me", ""); ]]> - +This sample shows how to call DeleteEnvironment with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); + +Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "me", ""); +]]> - -This sample shows how to call DeployEnvironmentActionAsync with required parameters and request content. + +This sample shows how to call DeployEnvironmentActionAsync. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - actionId = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -var operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", +}); +Operation operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); ]]> This sample shows how to call DeployEnvironmentActionAsync with all parameters and request content. "); -var client = new EnvironmentsClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -var data = new { - actionId = "", - parameters = new {}, -}; - -var operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); -]]> - +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", + ["parameters"] = new Dictionary(), +}); +Operation operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); +]]> - -This sample shows how to call DeployEnvironmentAction with required parameters and request content. + +This sample shows how to call DeployEnvironmentAction. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - actionId = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -var operation = client.DeployEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", +}); +Operation operation = client.DeployEnvironmentAction(WaitUntil.Completed, "me", "", content); ]]> This sample shows how to call DeployEnvironmentAction with all parameters and request content. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - actionId = "", - parameters = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -var operation = client.DeployEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); -]]> - +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", + ["parameters"] = new Dictionary(), +}); +Operation operation = client.DeployEnvironmentAction(WaitUntil.Completed, "me", "", content); +]]> - -This sample shows how to call CustomEnvironmentActionAsync with required parameters and request content. + +This sample shows how to call CustomEnvironmentActionAsync. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - actionId = "", -}; - -var operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", +}); +Operation operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); ]]> This sample shows how to call CustomEnvironmentActionAsync with all parameters and request content. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - actionId = "", - parameters = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -var operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); -]]> - +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", + ["parameters"] = new Dictionary(), +}); +Operation operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); +]]> - -This sample shows how to call CustomEnvironmentAction with required parameters and request content. + +This sample shows how to call CustomEnvironmentAction. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - actionId = "", -}; - -var operation = client.CustomEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", +}); +Operation operation = client.CustomEnvironmentAction(WaitUntil.Completed, "me", "", content); ]]> This sample shows how to call CustomEnvironmentAction with all parameters and request content. "); -var client = new EnvironmentsClient(endpoint, "", credential); - -var data = new { - actionId = "", - parameters = new {}, -}; - -var operation = client.CustomEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); -]]> - +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["actionId"] = "", + ["parameters"] = new Dictionary(), +}); +Operation operation = client.CustomEnvironmentAction(WaitUntil.Completed, "me", "", content); +]]> \ No newline at end of file diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs index 35caff7366fc..2c0541b7eb4c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs @@ -7,11 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; +using Azure.Developer.DevCenter; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ public class Samples_DevBoxesClient [Ignore("Only validating compilation of examples")] public void Example_GetPool() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetPool("", new RequestContext()); + Response response = client.GetPool("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +37,11 @@ public void Example_GetPool() [Ignore("Only validating compilation of examples")] public void Example_GetPool_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetPool("", new RequestContext()); + Response response = client.GetPool("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -64,11 +64,11 @@ public void Example_GetPool_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPool_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetPoolAsync("", new RequestContext()); + Response response = await client.GetPoolAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -78,11 +78,11 @@ public async Task Example_GetPool_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPool_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetPoolAsync("", new RequestContext()); + Response response = await client.GetPoolAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -105,11 +105,11 @@ public async Task Example_GetPool_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetScheduleByPool() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetScheduleByPool("", "", new RequestContext()); + Response response = client.GetScheduleByPool("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -119,11 +119,11 @@ public void Example_GetScheduleByPool() [Ignore("Only validating compilation of examples")] public void Example_GetScheduleByPool_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetScheduleByPool("", "", new RequestContext()); + Response response = client.GetScheduleByPool("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -137,11 +137,11 @@ public void Example_GetScheduleByPool_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetScheduleByPool_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetScheduleByPoolAsync("", "", new RequestContext()); + Response response = await client.GetScheduleByPoolAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -151,11 +151,11 @@ public async Task Example_GetScheduleByPool_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetScheduleByPool_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetScheduleByPoolAsync("", "", new RequestContext()); + Response response = await client.GetScheduleByPoolAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -169,11 +169,11 @@ public async Task Example_GetScheduleByPool_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDevBoxByUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetDevBoxByUser("", "", new RequestContext()); + Response response = client.GetDevBoxByUser("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("poolName").ToString()); @@ -183,11 +183,11 @@ public void Example_GetDevBoxByUser() [Ignore("Only validating compilation of examples")] public void Example_GetDevBoxByUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetDevBoxByUser("", "", new RequestContext()); + Response response = client.GetDevBoxByUser("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -220,11 +220,11 @@ public void Example_GetDevBoxByUser_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevBoxByUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetDevBoxByUserAsync("", "", new RequestContext()); + Response response = await client.GetDevBoxByUserAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("poolName").ToString()); @@ -234,11 +234,11 @@ public async Task Example_GetDevBoxByUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevBoxByUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetDevBoxByUserAsync("", "", new RequestContext()); + Response response = await client.GetDevBoxByUserAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -271,11 +271,11 @@ public async Task Example_GetDevBoxByUser_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetRemoteConnection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetRemoteConnection("", "", new RequestContext()); + Response response = client.GetRemoteConnection("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -285,11 +285,11 @@ public void Example_GetRemoteConnection() [Ignore("Only validating compilation of examples")] public void Example_GetRemoteConnection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetRemoteConnection("", "", new RequestContext()); + Response response = client.GetRemoteConnection("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("webUrl").ToString()); @@ -300,11 +300,11 @@ public void Example_GetRemoteConnection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetRemoteConnection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetRemoteConnectionAsync("", "", new RequestContext()); + Response response = await client.GetRemoteConnectionAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -314,11 +314,11 @@ public async Task Example_GetRemoteConnection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetRemoteConnection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetRemoteConnectionAsync("", "", new RequestContext()); + Response response = await client.GetRemoteConnectionAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("webUrl").ToString()); @@ -329,11 +329,11 @@ public async Task Example_GetRemoteConnection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUpcomingAction() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetUpcomingAction("", "", "", new RequestContext()); + Response response = client.GetUpcomingAction("me", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -343,11 +343,11 @@ public void Example_GetUpcomingAction() [Ignore("Only validating compilation of examples")] public void Example_GetUpcomingAction_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.GetUpcomingAction("", "", "", new RequestContext()); + Response response = client.GetUpcomingAction("me", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -362,11 +362,11 @@ public void Example_GetUpcomingAction_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpcomingAction_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetUpcomingActionAsync("", "", "", new RequestContext()); + Response response = await client.GetUpcomingActionAsync("me", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -376,11 +376,11 @@ public async Task Example_GetUpcomingAction_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpcomingAction_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.GetUpcomingActionAsync("", "", "", new RequestContext()); + Response response = await client.GetUpcomingActionAsync("me", "", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -395,11 +395,11 @@ public async Task Example_GetUpcomingAction_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_SkipUpcomingAction() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.SkipUpcomingAction("", "", ""); + Response response = client.SkipUpcomingAction("me", "", ""); Console.WriteLine(response.Status); } @@ -407,11 +407,11 @@ public void Example_SkipUpcomingAction() [Ignore("Only validating compilation of examples")] public void Example_SkipUpcomingAction_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.SkipUpcomingAction("", "", ""); + Response response = client.SkipUpcomingAction("me", "", ""); Console.WriteLine(response.Status); } @@ -419,11 +419,11 @@ public void Example_SkipUpcomingAction_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_SkipUpcomingAction_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.SkipUpcomingActionAsync("", "", ""); + Response response = await client.SkipUpcomingActionAsync("me", "", ""); Console.WriteLine(response.Status); } @@ -431,11 +431,11 @@ public async Task Example_SkipUpcomingAction_Async() [Ignore("Only validating compilation of examples")] public async Task Example_SkipUpcomingAction_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.SkipUpcomingActionAsync("", "", ""); + Response response = await client.SkipUpcomingActionAsync("me", "", ""); Console.WriteLine(response.Status); } @@ -443,11 +443,11 @@ public async Task Example_SkipUpcomingAction_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DelayUpcomingAction() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.DelayUpcomingAction("", "", "", DateTimeOffset.UtcNow, new RequestContext()); + Response response = client.DelayUpcomingAction("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -457,11 +457,11 @@ public void Example_DelayUpcomingAction() [Ignore("Only validating compilation of examples")] public void Example_DelayUpcomingAction_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = client.DelayUpcomingAction("", "", "", DateTimeOffset.UtcNow, new RequestContext()); + Response response = client.DelayUpcomingAction("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -476,11 +476,11 @@ public void Example_DelayUpcomingAction_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DelayUpcomingAction_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.DelayUpcomingActionAsync("", "", "", DateTimeOffset.UtcNow, new RequestContext()); + Response response = await client.DelayUpcomingActionAsync("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -490,11 +490,11 @@ public async Task Example_DelayUpcomingAction_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DelayUpcomingAction_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Response response = await client.DelayUpcomingActionAsync("", "", "", DateTimeOffset.UtcNow, new RequestContext()); + Response response = await client.DelayUpcomingActionAsync("me", "", "", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -509,14 +509,14 @@ public async Task Example_DelayUpcomingAction_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetPools() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetPools(1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPools(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -524,27 +524,27 @@ public void Example_GetPools() [Ignore("Only validating compilation of examples")] public void Example_GetPools_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetPools(1234, "", new RequestContext())) + foreach (BinaryData item in client.GetPools(1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } @@ -552,14 +552,14 @@ public void Example_GetPools_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetPools_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetPoolsAsync(1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPoolsAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -567,27 +567,27 @@ public async Task Example_GetPools_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetPools_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetPoolsAsync(1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetPoolsAsync(1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } @@ -595,14 +595,14 @@ public async Task Example_GetPools_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetSchedulesByPool() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetSchedulesByPool("", 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSchedulesByPool("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -610,18 +610,18 @@ public void Example_GetSchedulesByPool() [Ignore("Only validating compilation of examples")] public void Example_GetSchedulesByPool_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetSchedulesByPool("", 1234, "", new RequestContext())) + foreach (BinaryData item in client.GetSchedulesByPool("", 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("frequency").ToString()); + Console.WriteLine(result[0].GetProperty("time").ToString()); + Console.WriteLine(result[0].GetProperty("timeZone").ToString()); } } @@ -629,14 +629,14 @@ public void Example_GetSchedulesByPool_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSchedulesByPool_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetSchedulesByPoolAsync("", 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSchedulesByPoolAsync("", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -644,18 +644,18 @@ public async Task Example_GetSchedulesByPool_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSchedulesByPool_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetSchedulesByPoolAsync("", 1234, "", new RequestContext())) + await foreach (BinaryData item in client.GetSchedulesByPoolAsync("", 1234, "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("time").ToString()); - Console.WriteLine(result.GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("frequency").ToString()); + Console.WriteLine(result[0].GetProperty("time").ToString()); + Console.WriteLine(result[0].GetProperty("timeZone").ToString()); } } @@ -663,14 +663,14 @@ public async Task Example_GetSchedulesByPool_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDevBoxesByUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetDevBoxesByUser("", "", 1234, new RequestContext())) + foreach (BinaryData item in client.GetDevBoxesByUser("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } } @@ -678,37 +678,37 @@ public void Example_GetDevBoxesByUser() [Ignore("Only validating compilation of examples")] public void Example_GetDevBoxesByUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetDevBoxesByUser("", "", 1234, new RequestContext())) + foreach (BinaryData item in client.GetDevBoxesByUser("me", "", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } @@ -716,14 +716,14 @@ public void Example_GetDevBoxesByUser_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevBoxesByUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetDevBoxesByUserAsync("", "", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetDevBoxesByUserAsync("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } } @@ -731,37 +731,37 @@ public async Task Example_GetDevBoxesByUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevBoxesByUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetDevBoxesByUserAsync("", "", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetDevBoxesByUserAsync("me", "", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } @@ -769,14 +769,14 @@ public async Task Example_GetDevBoxesByUser_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUpcomingActions() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetUpcomingActions("", "", new RequestContext())) + foreach (BinaryData item in client.GetUpcomingActions("me", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -784,19 +784,19 @@ public void Example_GetUpcomingActions() [Ignore("Only validating compilation of examples")] public void Example_GetUpcomingActions_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - foreach (var item in client.GetUpcomingActions("", "", new RequestContext())) + foreach (BinaryData item in client.GetUpcomingActions("me", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actionType").ToString()); + Console.WriteLine(result[0].GetProperty("reason").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("originalScheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("sourceId").ToString()); } } @@ -804,14 +804,14 @@ public void Example_GetUpcomingActions_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpcomingActions_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetUpcomingActionsAsync("", "", new RequestContext())) + await foreach (BinaryData item in client.GetUpcomingActionsAsync("me", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -819,19 +819,19 @@ public async Task Example_GetUpcomingActions_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpcomingActions_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - await foreach (var item in client.GetUpcomingActionsAsync("", "", new RequestContext())) + await foreach (BinaryData item in client.GetUpcomingActionsAsync("me", "", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actionType").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("scheduledTime").ToString()); - Console.WriteLine(result.GetProperty("originalScheduledTime").ToString()); - Console.WriteLine(result.GetProperty("sourceId").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actionType").ToString()); + Console.WriteLine(result[0].GetProperty("reason").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("originalScheduledTime").ToString()); + Console.WriteLine(result[0].GetProperty("sourceId").ToString()); } } @@ -839,18 +839,17 @@ public async Task Example_GetUpcomingActions_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateDevBox() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - poolName = "", - }; - - var operation = client.CreateDevBox(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["poolName"] = "", + }); + Operation operation = client.CreateDevBox(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolName").ToString()); } @@ -859,19 +858,18 @@ public void Example_CreateDevBox() [Ignore("Only validating compilation of examples")] public void Example_CreateDevBox_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - poolName = "", - localAdministrator = "Enabled", - }; - - var operation = client.CreateDevBox(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["poolName"] = "", + ["localAdministrator"] = "Enabled", + }); + Operation operation = client.CreateDevBox(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -903,18 +901,17 @@ public void Example_CreateDevBox_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateDevBox_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - poolName = "", - }; - - var operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["poolName"] = "", + }); + Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("poolName").ToString()); } @@ -923,19 +920,18 @@ public async Task Example_CreateDevBox_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateDevBox_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - poolName = "", - localAdministrator = "Enabled", - }; - - var operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["poolName"] = "", + ["localAdministrator"] = "Enabled", + }); + Operation operation = await client.CreateDevBoxAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("projectName").ToString()); @@ -967,156 +963,132 @@ public async Task Example_CreateDevBox_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteDevBox() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var operation = client.DeleteDevBox(WaitUntil.Completed, "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteDevBox(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeleteDevBox_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = client.DeleteDevBox(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteDevBox(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDevBox_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDevBox_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteDevBoxAsync(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_StartDevBox() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = client.StartDevBox(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.StartDevBox(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_StartDevBox_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = client.StartDevBox(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.StartDevBox(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_StartDevBox_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var operation = await client.StartDevBoxAsync(WaitUntil.Completed, "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_StartDevBox_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = await client.StartDevBoxAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.StartDevBoxAsync(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_StopDevBox() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = client.StopDevBox(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.StopDevBox(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_StopDevBox_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - var operation = client.StopDevBox(WaitUntil.Completed, "", "", true); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.StopDevBox(WaitUntil.Completed, "me", "", hibernate: true); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_StopDevBox_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_StopDevBox_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevBoxesClient(endpoint, "", credential); - - var operation = await client.StopDevBoxAsync(WaitUntil.Completed, "", "", true); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevBoxesClient client = new DevBoxesClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.StopDevBoxAsync(WaitUntil.Completed, "me", "", hibernate: true); } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs index ba9e73bb21b4..f0174744be39 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevCenterClient.cs @@ -6,12 +6,11 @@ #nullable disable using System; -using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; +using Azure.Developer.DevCenter; using Azure.Identity; using NUnit.Framework; @@ -23,11 +22,11 @@ public class Samples_DevCenterClient [Ignore("Only validating compilation of examples")] public void Example_GetProject() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = client.GetProject("", new RequestContext()); + Response response = client.GetProject("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +36,11 @@ public void Example_GetProject() [Ignore("Only validating compilation of examples")] public void Example_GetProject_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = client.GetProject("", new RequestContext()); + Response response = client.GetProject("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -52,11 +51,11 @@ public void Example_GetProject_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProject_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = await client.GetProjectAsync("", new RequestContext()); + Response response = await client.GetProjectAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -66,11 +65,11 @@ public async Task Example_GetProject_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProject_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - Response response = await client.GetProjectAsync("", new RequestContext()); + Response response = await client.GetProjectAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -81,14 +80,14 @@ public async Task Example_GetProject_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetProjects() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - foreach (var item in client.GetProjects("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetProjects(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -96,15 +95,15 @@ public void Example_GetProjects() [Ignore("Only validating compilation of examples")] public void Example_GetProjects_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - foreach (var item in client.GetProjects("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetProjects("", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); } } @@ -112,14 +111,14 @@ public void Example_GetProjects_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjects_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - await foreach (var item in client.GetProjectsAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetProjectsAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -127,15 +126,15 @@ public async Task Example_GetProjects_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProjects_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - await foreach (var item in client.GetProjectsAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetProjectsAsync("", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); } } @@ -143,14 +142,14 @@ public async Task Example_GetProjects_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllDevBoxes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - foreach (var item in client.GetAllDevBoxes("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetAllDevBoxes(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } } @@ -158,37 +157,37 @@ public void Example_GetAllDevBoxes() [Ignore("Only validating compilation of examples")] public void Example_GetAllDevBoxes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - foreach (var item in client.GetAllDevBoxes("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetAllDevBoxes("", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } @@ -196,14 +195,14 @@ public void Example_GetAllDevBoxes_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllDevBoxes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - await foreach (var item in client.GetAllDevBoxesAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetAllDevBoxesAsync(null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } } @@ -211,37 +210,37 @@ public async Task Example_GetAllDevBoxes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllDevBoxes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - await foreach (var item in client.GetAllDevBoxesAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetAllDevBoxesAsync("", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } @@ -249,14 +248,14 @@ public async Task Example_GetAllDevBoxes_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAllDevBoxesByUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - foreach (var item in client.GetAllDevBoxesByUser("", "", 1234, new RequestContext())) + foreach (BinaryData item in client.GetAllDevBoxesByUser("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } } @@ -264,37 +263,37 @@ public void Example_GetAllDevBoxesByUser() [Ignore("Only validating compilation of examples")] public void Example_GetAllDevBoxesByUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - foreach (var item in client.GetAllDevBoxesByUser("", "", 1234, new RequestContext())) + foreach (BinaryData item in client.GetAllDevBoxesByUser("me", "", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } @@ -302,14 +301,14 @@ public void Example_GetAllDevBoxesByUser_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllDevBoxesByUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - await foreach (var item in client.GetAllDevBoxesByUserAsync("", "", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); } } @@ -317,37 +316,37 @@ public async Task Example_GetAllDevBoxesByUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAllDevBoxesByUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DevCenterClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DevCenterClient client = new DevCenterClient(endpoint, credential); - await foreach (var item in client.GetAllDevBoxesByUserAsync("", "", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetAllDevBoxesByUserAsync("me", "", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("projectName").ToString()); - Console.WriteLine(result.GetProperty("poolName").ToString()); - Console.WriteLine(result.GetProperty("hibernateSupport").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("actionState").ToString()); - Console.WriteLine(result.GetProperty("powerState").ToString()); - Console.WriteLine(result.GetProperty("uniqueId").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("errorDetails").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("location").ToString()); - Console.WriteLine(result.GetProperty("osType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("skuName").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); - Console.WriteLine(result.GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); - Console.WriteLine(result.GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("operatingSystem").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); - Console.WriteLine(result.GetProperty("imageReference").GetProperty("publishedDate").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("localAdministrator").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("projectName").ToString()); + Console.WriteLine(result[0].GetProperty("poolName").ToString()); + Console.WriteLine(result[0].GetProperty("hibernateSupport").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("actionState").ToString()); + Console.WriteLine(result[0].GetProperty("powerState").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueId").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("errorDetails").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("location").ToString()); + Console.WriteLine(result[0].GetProperty("osType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("skuName").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("vCPUs").ToString()); + Console.WriteLine(result[0].GetProperty("hardwareProfile").GetProperty("memoryGB").ToString()); + Console.WriteLine(result[0].GetProperty("storageProfile").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("operatingSystem").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("osBuildNumber").ToString()); + Console.WriteLine(result[0].GetProperty("imageReference").GetProperty("publishedDate").ToString()); + Console.WriteLine(result[0].GetProperty("createdTime").ToString()); + Console.WriteLine(result[0].GetProperty("localAdministrator").ToString()); } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_EnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_EnvironmentsClient.cs index 4c9a107a2af2..1b9ebbb0bf7c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_EnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_EnvironmentsClient.cs @@ -7,11 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; +using Azure.Developer.DevCenter; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ public class Samples_EnvironmentsClient [Ignore("Only validating compilation of examples")] public void Example_GetEnvironmentByUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = client.GetEnvironmentByUser("", "", new RequestContext()); + Response response = client.GetEnvironmentByUser("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -38,11 +38,11 @@ public void Example_GetEnvironmentByUser() [Ignore("Only validating compilation of examples")] public void Example_GetEnvironmentByUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = client.GetEnvironmentByUser("", "", new RequestContext()); + Response response = client.GetEnvironmentByUser("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -54,21 +54,21 @@ public void Example_GetEnvironmentByUser_AllParameters() Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironmentByUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = await client.GetEnvironmentByUserAsync("", "", new RequestContext()); + Response response = await client.GetEnvironmentByUserAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -79,11 +79,11 @@ public async Task Example_GetEnvironmentByUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironmentByUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = await client.GetEnvironmentByUserAsync("", "", new RequestContext()); + Response response = await client.GetEnvironmentByUserAsync("me", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -95,26 +95,22 @@ public async Task Example_GetEnvironmentByUser_AllParameters_Async() Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_UpdateEnvironment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new - { - environmentType = "", - }; - - Response response = client.UpdateEnvironment("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.UpdateEnvironment("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -125,34 +121,31 @@ public void Example_UpdateEnvironment() [Ignore("Only validating compilation of examples")] public void Example_UpdateEnvironment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new { }, - scheduledTasks = new + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new + ["tags"] = new Dictionary() { - key = "", + ["key"] = "", }, - }; - - Response response = client.UpdateEnvironment("", "", RequestContent.Create(data)); + }); + Response response = client.UpdateEnvironment("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -164,26 +157,22 @@ public void Example_UpdateEnvironment_AllParameters() Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_UpdateEnvironment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); - - var data = new - { - environmentType = "", - }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = await client.UpdateEnvironmentAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.UpdateEnvironmentAsync("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -194,34 +183,31 @@ public async Task Example_UpdateEnvironment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateEnvironment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new { }, - scheduledTasks = new + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new + ["tags"] = new Dictionary() { - key = "", + ["key"] = "", }, - }; - - Response response = await client.UpdateEnvironmentAsync("", "", RequestContent.Create(data)); + }); + Response response = await client.UpdateEnvironmentAsync("me", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -233,21 +219,21 @@ public async Task Example_UpdateEnvironment_AllParameters_Async() Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItem() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = client.GetCatalogItem("", new RequestContext()); + Response response = client.GetCatalogItem("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -257,11 +243,11 @@ public void Example_GetCatalogItem() [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItem_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = client.GetCatalogItem("", new RequestContext()); + Response response = client.GetCatalogItem("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -273,11 +259,11 @@ public void Example_GetCatalogItem_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItem_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = await client.GetCatalogItemAsync("", new RequestContext()); + Response response = await client.GetCatalogItemAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -287,11 +273,11 @@ public async Task Example_GetCatalogItem_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItem_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = await client.GetCatalogItemAsync("", new RequestContext()); + Response response = await client.GetCatalogItemAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -303,11 +289,11 @@ public async Task Example_GetCatalogItem_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItemVersion() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = client.GetCatalogItemVersion("", "", new RequestContext()); + Response response = client.GetCatalogItemVersion("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -317,11 +303,11 @@ public void Example_GetCatalogItemVersion() [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItemVersion_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = client.GetCatalogItemVersion("", "", new RequestContext()); + Response response = client.GetCatalogItemVersion("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("catalogItemId").ToString()); @@ -364,11 +350,11 @@ public void Example_GetCatalogItemVersion_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItemVersion_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = await client.GetCatalogItemVersionAsync("", "", new RequestContext()); + Response response = await client.GetCatalogItemVersionAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -378,11 +364,11 @@ public async Task Example_GetCatalogItemVersion_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItemVersion_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Response response = await client.GetCatalogItemVersionAsync("", "", new RequestContext()); + Response response = await client.GetCatalogItemVersionAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("catalogItemId").ToString()); @@ -425,15 +411,15 @@ public async Task Example_GetCatalogItemVersion_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetEnvironments() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetEnvironments(1234, new RequestContext())) + foreach (BinaryData item in client.GetEnvironments(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -441,26 +427,26 @@ public void Example_GetEnvironments() [Ignore("Only validating compilation of examples")] public void Example_GetEnvironments_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetEnvironments(1234, new RequestContext())) + foreach (BinaryData item in client.GetEnvironments(1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); } } @@ -468,15 +454,15 @@ public void Example_GetEnvironments_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironments_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetEnvironmentsAsync(1234, new RequestContext())) + await foreach (BinaryData item in client.GetEnvironmentsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -484,26 +470,26 @@ public async Task Example_GetEnvironments_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironments_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetEnvironmentsAsync(1234, new RequestContext())) + await foreach (BinaryData item in client.GetEnvironmentsAsync(1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); } } @@ -511,15 +497,15 @@ public async Task Example_GetEnvironments_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetEnvironmentsByUser() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetEnvironmentsByUser("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetEnvironmentsByUser("me", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -527,26 +513,26 @@ public void Example_GetEnvironmentsByUser() [Ignore("Only validating compilation of examples")] public void Example_GetEnvironmentsByUser_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetEnvironmentsByUser("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetEnvironmentsByUser("me", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); } } @@ -554,15 +540,15 @@ public void Example_GetEnvironmentsByUser_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironmentsByUser_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetEnvironmentsByUserAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetEnvironmentsByUserAsync("me", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -570,26 +556,26 @@ public async Task Example_GetEnvironmentsByUser_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironmentsByUser_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetEnvironmentsByUserAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetEnvironmentsByUserAsync("me", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentType").ToString()); - Console.WriteLine(result.GetProperty("user").ToString()); - Console.WriteLine(result.GetProperty("provisioningState").ToString()); - Console.WriteLine(result.GetProperty("resourceGroupId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("environmentType").ToString()); + Console.WriteLine(result[0].GetProperty("user").ToString()); + Console.WriteLine(result[0].GetProperty("provisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("resourceGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("parameters").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("tags").GetProperty("").ToString()); } } @@ -597,14 +583,14 @@ public async Task Example_GetEnvironmentsByUser_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItems() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetCatalogItems(1234, new RequestContext())) + foreach (BinaryData item in client.GetCatalogItems(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -612,16 +598,16 @@ public void Example_GetCatalogItems() [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItems_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetCatalogItems(1234, new RequestContext())) + foreach (BinaryData item in client.GetCatalogItems(1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); } } @@ -629,14 +615,14 @@ public void Example_GetCatalogItems_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItems_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetCatalogItemsAsync(1234, new RequestContext())) + await foreach (BinaryData item in client.GetCatalogItemsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -644,16 +630,16 @@ public async Task Example_GetCatalogItems_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItems_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetCatalogItemsAsync(1234, new RequestContext())) + await foreach (BinaryData item in client.GetCatalogItemsAsync(1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); } } @@ -661,14 +647,14 @@ public async Task Example_GetCatalogItems_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItemVersions() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetCatalogItemVersions("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetCatalogItemVersions("", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -676,47 +662,47 @@ public void Example_GetCatalogItemVersions() [Ignore("Only validating compilation of examples")] public void Example_GetCatalogItemVersions_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetCatalogItemVersions("", 1234, new RequestContext())) + foreach (BinaryData item in client.GetCatalogItemVersions("", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("catalogItemId").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("summary").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("eligibleForLatestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemId").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("summary").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("eligibleForLatestVersion").ToString()); } } @@ -724,14 +710,14 @@ public void Example_GetCatalogItemVersions_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItemVersions_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetCatalogItemVersionsAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetCatalogItemVersionsAsync("", null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -739,47 +725,47 @@ public async Task Example_GetCatalogItemVersions_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCatalogItemVersions_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetCatalogItemVersionsAsync("", 1234, new RequestContext())) + await foreach (BinaryData item in client.GetCatalogItemVersionsAsync("", 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("catalogItemId").ToString()); - Console.WriteLine(result.GetProperty("catalogItemName").ToString()); - Console.WriteLine(result.GetProperty("catalogName").ToString()); - Console.WriteLine(result.GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("summary").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("templatePath").ToString()); - Console.WriteLine(result.GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("actions")[0].GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("runner").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("eligibleForLatestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemId").ToString()); + Console.WriteLine(result[0].GetProperty("catalogItemName").ToString()); + Console.WriteLine(result[0].GetProperty("catalogName").ToString()); + Console.WriteLine(result[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("summary").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("templatePath").ToString()); + Console.WriteLine(result[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parametersSchema").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("default").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("readOnly").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("parameters")[0].GetProperty("allowed")[0].ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("actions")[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("runner").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("eligibleForLatestVersion").ToString()); } } @@ -787,14 +773,14 @@ public async Task Example_GetCatalogItemVersions_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetEnvironmentTypes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetEnvironmentTypes(1234, new RequestContext())) + foreach (BinaryData item in client.GetEnvironmentTypes(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -802,16 +788,16 @@ public void Example_GetEnvironmentTypes() [Ignore("Only validating compilation of examples")] public void Example_GetEnvironmentTypes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - foreach (var item in client.GetEnvironmentTypes(1234, new RequestContext())) + foreach (BinaryData item in client.GetEnvironmentTypes(1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } } @@ -819,14 +805,14 @@ public void Example_GetEnvironmentTypes_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironmentTypes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetEnvironmentTypesAsync(1234, new RequestContext())) + await foreach (BinaryData item in client.GetEnvironmentTypesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -834,16 +820,16 @@ public async Task Example_GetEnvironmentTypes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetEnvironmentTypes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - await foreach (var item in client.GetEnvironmentTypesAsync(1234, new RequestContext())) + await foreach (BinaryData item in client.GetEnvironmentTypesAsync(1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deploymentTargetId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentTargetId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } } @@ -851,18 +837,17 @@ public async Task Example_GetEnvironmentTypes_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEnvironment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - environmentType = "", - }; - - var operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["environmentType"] = "", + }); + Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.ToString()); @@ -872,36 +857,35 @@ public void Example_CreateOrUpdateEnvironment() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEnvironment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new { }, - scheduledTasks = new + ["environmentType"] = "", + ["user"] = "", + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new + ["tags"] = new Dictionary() { - key = "", + ["key"] = "", }, - }; - - var operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + }); + Operation operation = client.CreateOrUpdateEnvironment(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -912,28 +896,27 @@ public void Example_CreateOrUpdateEnvironment_AllParameters() Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEnvironment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - environmentType = "", - }; - - var operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + ["environmentType"] = "", + }); + Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("environmentType").ToString()); Console.WriteLine(result.ToString()); @@ -943,36 +926,35 @@ public async Task Example_CreateOrUpdateEnvironment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEnvironment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - environmentType = "", - user = "", - description = "", - catalogName = "", - catalogItemName = "", - parameters = new { }, - scheduledTasks = new + ["environmentType"] = "", + ["user"] = "", + ["description"] = "", + ["catalogName"] = "", + ["catalogItemName"] = "", + ["parameters"] = new Dictionary(), + ["scheduledTasks"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - type = "AutoExpire", - enabled = "Enabled", - startTime = "2022-05-10T18:57:31.2311892Z", + ["type"] = "AutoExpire", + ["enabled"] = "Enabled", + ["startTime"] = "2022-05-10T18:57:31.2311892Z", }, }, - tags = new + ["tags"] = new Dictionary() { - key = "", + ["key"] = "", }, - }; - - var operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - + }); + Operation operation = await client.CreateOrUpdateEnvironmentAsync(WaitUntil.Completed, "me", "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("environmentType").ToString()); @@ -983,210 +965,178 @@ public async Task Example_CreateOrUpdateEnvironment_AllParameters_Async() Console.WriteLine(result.GetProperty("catalogName").ToString()); Console.WriteLine(result.GetProperty("catalogItemName").ToString()); Console.WriteLine(result.GetProperty("parameters").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); - Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("scheduledTasks").GetProperty("").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeleteEnvironment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); - - var operation = client.DeleteEnvironment(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeleteEnvironment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var operation = client.DeleteEnvironment(WaitUntil.Completed, "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteEnvironment(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteEnvironment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); - - var operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteEnvironment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); - - var operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteEnvironmentAsync(WaitUntil.Completed, "me", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeployEnvironmentAction() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - }; - - var operation = client.DeployEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + }); + Operation operation = client.DeployEnvironmentAction(WaitUntil.Completed, "me", "", content); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeployEnvironmentAction_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - parameters = new { }, - }; - - var operation = client.DeployEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + ["parameters"] = new Dictionary(), + }); + Operation operation = client.DeployEnvironmentAction(WaitUntil.Completed, "me", "", content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeployEnvironmentAction_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - }; - - var operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + }); + Operation operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeployEnvironmentAction_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - parameters = new { }, - }; - - var operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + ["parameters"] = new Dictionary(), + }); + Operation operation = await client.DeployEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CustomEnvironmentAction() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - }; - - var operation = client.CustomEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + }); + Operation operation = client.CustomEnvironmentAction(WaitUntil.Completed, "me", "", content); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CustomEnvironmentAction_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - parameters = new { }, - }; - - var operation = client.CustomEnvironmentAction(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + ["parameters"] = new Dictionary(), + }); + Operation operation = client.CustomEnvironmentAction(WaitUntil.Completed, "me", "", content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CustomEnvironmentAction_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - }; - - var operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + }); + Operation operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CustomEnvironmentAction_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new EnvironmentsClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EnvironmentsClient client = new EnvironmentsClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - actionId = "", - parameters = new { }, - }; - - var operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "", "", RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + ["actionId"] = "", + ["parameters"] = new Dictionary(), + }); + Operation operation = await client.CustomEnvironmentActionAsync(WaitUntil.Completed, "me", "", content); } } } diff --git a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml index f50a0025334d..bca8318df54f 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceManagementClient.xml @@ -2,12 +2,24 @@ - -This sample shows how to call GetDeviceClassAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceClassAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeviceClassAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +]]> +This sample shows how to call GetDeviceClassAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassAsync(""); @@ -16,22 +28,33 @@ Console.WriteLine(result.GetProperty("deviceClassId").ToString()); Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); -]]> - +]]> - -This sample shows how to call GetDeviceClass with required parameters and parse the result. + +This sample shows how to call GetDeviceClass and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeviceClass(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +]]> +This sample shows how to call GetDeviceClass with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClass(""); @@ -40,104 +63,162 @@ Console.WriteLine(result.GetProperty("deviceClassId").ToString()); Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); -]]> - +]]> - -This sample shows how to call UpdateDeviceClassAsync with required parameters and request content and parse the result. + +This sample shows how to call UpdateDeviceClassAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = await client.UpdateDeviceClassAsync("", content); -var data = new { - friendlyName = "", -}; +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateDeviceClassAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -Response response = await client.UpdateDeviceClassAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = await client.UpdateDeviceClassAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); -]]> - +]]> - -This sample shows how to call UpdateDeviceClass with required parameters and request content and parse the result. + +This sample shows how to call UpdateDeviceClass and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -var data = new { - friendlyName = "", -}; +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = client.UpdateDeviceClass("", content); -Response response = client.UpdateDeviceClass("", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateDeviceClass with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = client.UpdateDeviceClass("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); -]]> - +]]> - -This sample shows how to call DeleteDeviceClassAsync with required parameters. + +This sample shows how to call DeleteDeviceClassAsync. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeviceClassAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.DeleteDeviceClassAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteDeviceClass with required parameters. + +This sample shows how to call DeleteDeviceClass. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClass(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeviceClass with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.DeleteDeviceClass(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetDeviceAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeviceAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); +]]> +This sample shows how to call GetDeviceAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceAsync(""); @@ -171,16 +252,28 @@ Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResul Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); -]]> - +]]> - -This sample shows how to call GetDevice with required parameters and parse the result. + +This sample shows how to call GetDevice and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDevice(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); +]]> +This sample shows how to call GetDevice with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDevice(""); @@ -214,16 +307,28 @@ Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResul Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); -]]> - +]]> - -This sample shows how to call GetDeviceModuleAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceModuleAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeviceModuleAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); +]]> +This sample shows how to call GetDeviceModuleAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceModuleAsync("", ""); @@ -257,16 +362,28 @@ Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResul Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); -]]> - +]]> - -This sample shows how to call GetDeviceModule with required parameters and parse the result. + +This sample shows how to call GetDeviceModule and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeviceModule("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); +]]> +This sample shows how to call GetDeviceModule with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceModule("", ""); @@ -300,16 +417,15 @@ Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResul Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); -]]> - +]]> - + This sample shows how to call GetUpdateComplianceAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetUpdateComplianceAsync(); @@ -319,15 +435,28 @@ Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); ]]> - +This sample shows how to call GetUpdateComplianceAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetUpdateComplianceAsync(); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); +]]> - + This sample shows how to call GetUpdateCompliance and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetUpdateCompliance(); @@ -337,15 +466,41 @@ Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); ]]> - +This sample shows how to call GetUpdateCompliance with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetUpdateCompliance(); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); +]]> - -This sample shows how to call GetGroupAsync with required parameters and parse the result. + +This sample shows how to call GetGroupAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetGroupAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("groupType").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call GetGroupAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetGroupAsync(""); @@ -358,16 +513,28 @@ Console.WriteLine(result.GetProperty("subgroupsWithNewUpdatesAvailableCount").To Console.WriteLine(result.GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); Console.WriteLine(result.GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); Console.WriteLine(result.GetProperty("deployments")[0].ToString()); -]]> - +]]> - -This sample shows how to call GetGroup with required parameters and parse the result. + +This sample shows how to call GetGroup and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetGroup(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("groupType").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call GetGroup with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetGroup(""); @@ -380,42 +547,57 @@ Console.WriteLine(result.GetProperty("subgroupsWithNewUpdatesAvailableCount").To Console.WriteLine(result.GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); Console.WriteLine(result.GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); Console.WriteLine(result.GetProperty("deployments")[0].ToString()); -]]> - +]]> - -This sample shows how to call DeleteGroupAsync with required parameters. + +This sample shows how to call DeleteGroupAsync. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteGroupAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGroupAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.DeleteGroupAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteGroup with required parameters. + +This sample shows how to call DeleteGroup. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteGroup(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGroup with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.DeleteGroup(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetUpdateComplianceForGroupAsync with required parameters and parse the result. + +This sample shows how to call GetUpdateComplianceForGroupAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetUpdateComplianceForGroupAsync(""); @@ -425,15 +607,28 @@ Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); ]]> - +This sample shows how to call GetUpdateComplianceForGroupAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetUpdateComplianceForGroupAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); +]]> - -This sample shows how to call GetUpdateComplianceForGroup with required parameters and parse the result. + +This sample shows how to call GetUpdateComplianceForGroup and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetUpdateComplianceForGroup(""); @@ -443,15 +638,44 @@ Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); ]]> - +This sample shows how to call GetUpdateComplianceForGroup with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetUpdateComplianceForGroup(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); +]]> - -This sample shows how to call GetDeploymentAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeploymentAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call GetDeploymentAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentAsync("", ""); @@ -475,16 +699,31 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call GetDeployment with required parameters and parse the result. + +This sample shows how to call GetDeployment and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeployment("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call GetDeployment with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeployment("", ""); @@ -508,31 +747,32 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateDeploymentAsync with required parameters and request content, and how to parse the result. -"); -var client = new DeviceManagementClient(endpoint, "", credential); - -var data = new { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new { - updateId = new { - provider = "", - name = "", - version = "", + +This sample shows how to call CreateOrUpdateDeploymentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() + { + ["updateId"] = new Dictionary() + { + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", -}; - -Response response = await client.CreateOrUpdateDeploymentAsync("", "", RequestContent.Create(data)); + ["groupId"] = "", +}); +Response response = await client.CreateOrUpdateDeploymentAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -542,45 +782,45 @@ Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProper Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("groupId").ToString()); ]]> -This sample shows how to call CreateOrUpdateDeploymentAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateDeploymentAsync with all parameters and request content and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -var data = new { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new { - updateId = new { - provider = "", - name = "", - version = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() + { + ["updateId"] = new Dictionary() + { + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", - deviceClassSubgroups = new[] { - "" - }, - isCanceled = true, - isRetried = true, - rollbackPolicy = new { - update = new { - updateId = new { - provider = "", - name = "", - version = "", - }, - }, - failure = new { - devicesFailedPercentage = 1234, - devicesFailedCount = 1234, + ["groupId"] = "", + ["deviceClassSubgroups"] = new List() +{ +"" +}, + ["isCanceled"] = true, + ["isRetried"] = true, + ["rollbackPolicy"] = new Dictionary() + { + ["update"] = null +, + ["failure"] = new Dictionary() + { + ["devicesFailedPercentage"] = 1234, + ["devicesFailedCount"] = 1234, }, }, - isCloudInitiatedRollback = true, -}; - -Response response = await client.CreateOrUpdateDeploymentAsync("", "", RequestContent.Create(data)); + ["isCloudInitiatedRollback"] = true, +}); +Response response = await client.CreateOrUpdateDeploymentAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -602,31 +842,32 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateDeployment with required parameters and request content, and how to parse the result. -"); -var client = new DeviceManagementClient(endpoint, "", credential); - -var data = new { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new { - updateId = new { - provider = "", - name = "", - version = "", + +This sample shows how to call CreateOrUpdateDeployment and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() + { + ["updateId"] = new Dictionary() + { + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", -}; - -Response response = client.CreateOrUpdateDeployment("", "", RequestContent.Create(data)); + ["groupId"] = "", +}); +Response response = client.CreateOrUpdateDeployment("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -636,45 +877,45 @@ Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProper Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("groupId").ToString()); ]]> -This sample shows how to call CreateOrUpdateDeployment with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateDeployment with all parameters and request content and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -var data = new { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new { - updateId = new { - provider = "", - name = "", - version = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() + { + ["updateId"] = new Dictionary() + { + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", - deviceClassSubgroups = new[] { - "" - }, - isCanceled = true, - isRetried = true, - rollbackPolicy = new { - update = new { - updateId = new { - provider = "", - name = "", - version = "", - }, - }, - failure = new { - devicesFailedPercentage = 1234, - devicesFailedCount = 1234, + ["groupId"] = "", + ["deviceClassSubgroups"] = new List() +{ +"" +}, + ["isCanceled"] = true, + ["isRetried"] = true, + ["rollbackPolicy"] = new Dictionary() + { + ["update"] = null +, + ["failure"] = new Dictionary() + { + ["devicesFailedPercentage"] = 1234, + ["devicesFailedCount"] = 1234, }, }, - isCloudInitiatedRollback = true, -}; - -Response response = client.CreateOrUpdateDeployment("", "", RequestContent.Create(data)); + ["isCloudInitiatedRollback"] = true, +}); +Response response = client.CreateOrUpdateDeployment("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -696,42 +937,72 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call DeleteDeploymentAsync with required parameters. + +This sample shows how to call DeleteDeploymentAsync. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentAsync("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeploymentAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.DeleteDeploymentAsync("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteDeployment with required parameters. + +This sample shows how to call DeleteDeployment. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeployment("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeployment with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.DeleteDeployment("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetDeploymentStatusAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentStatusAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeploymentStatusAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("deploymentState").ToString()); +Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("deploymentState").ToString()); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentStatusAsync("", ""); @@ -760,16 +1031,30 @@ Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesIn Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesCompletedFailedCount").ToString()); Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesCompletedSucceededCount").ToString()); Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesCanceledCount").ToString()); -]]> - +]]> - -This sample shows how to call GetDeploymentStatus with required parameters and parse the result. + +This sample shows how to call GetDeploymentStatus and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeploymentStatus("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("deploymentState").ToString()); +Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("deploymentState").ToString()); +]]> +This sample shows how to call GetDeploymentStatus with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeploymentStatus("", ""); @@ -798,16 +1083,28 @@ Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesIn Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesCompletedFailedCount").ToString()); Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesCompletedSucceededCount").ToString()); Console.WriteLine(result.GetProperty("subgroupStatus")[0].GetProperty("devicesCanceledCount").ToString()); -]]> - +]]> - -This sample shows how to call GetDeviceClassSubgroupAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroupAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeviceClassSubgroupAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call GetDeviceClassSubgroupAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupAsync("", ""); @@ -817,16 +1114,28 @@ Console.WriteLine(result.GetProperty("groupId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("deviceCount").ToString()); Console.WriteLine(result.GetProperty("deploymentId").ToString()); -]]> - +]]> - -This sample shows how to call GetDeviceClassSubgroup with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroup and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeviceClassSubgroup("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +]]> +This sample shows how to call GetDeviceClassSubgroup with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroup("", ""); @@ -836,42 +1145,57 @@ Console.WriteLine(result.GetProperty("groupId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("deviceCount").ToString()); Console.WriteLine(result.GetProperty("deploymentId").ToString()); -]]> - +]]> - -This sample shows how to call DeleteDeviceClassSubgroupAsync with required parameters. + +This sample shows how to call DeleteDeviceClassSubgroupAsync. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassSubgroupAsync("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeviceClassSubgroupAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.DeleteDeviceClassSubgroupAsync("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteDeviceClassSubgroup with required parameters. + +This sample shows how to call DeleteDeviceClassSubgroup. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClassSubgroup("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeviceClassSubgroup with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.DeleteDeviceClassSubgroup("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetDeviceClassSubgroupUpdateComplianceAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroupUpdateComplianceAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupUpdateComplianceAsync("", ""); @@ -881,15 +1205,42 @@ Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); ]]> - +This sample shows how to call GetDeviceClassSubgroupUpdateComplianceAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeviceClassSubgroupUpdateComplianceAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); +]]> - -This sample shows how to call GetDeviceClassSubgroupUpdateCompliance with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroupUpdateCompliance and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeviceClassSubgroupUpdateCompliance("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); +Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); +]]> +This sample shows how to call GetDeviceClassSubgroupUpdateCompliance with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroupUpdateCompliance("", ""); @@ -898,16 +1249,31 @@ Console.WriteLine(result.GetProperty("totalDeviceCount").ToString()); Console.WriteLine(result.GetProperty("onLatestUpdateDeviceCount").ToString()); Console.WriteLine(result.GetProperty("newUpdatesAvailableDeviceCount").ToString()); Console.WriteLine(result.GetProperty("updatesInProgressDeviceCount").ToString()); -]]> - +]]> - -This sample shows how to call GetBestUpdatesForDeviceClassSubgroupAsync with required parameters and parse the result. + +This sample shows how to call GetBestUpdatesForDeviceClassSubgroupAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetBestUpdatesForDeviceClassSubgroupAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("deviceCount").ToString()); +]]> +This sample shows how to call GetBestUpdatesForDeviceClassSubgroupAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetBestUpdatesForDeviceClassSubgroupAsync("", ""); @@ -920,16 +1286,31 @@ Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProper Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceCount").ToString()); -]]> - +]]> - -This sample shows how to call GetBestUpdatesForDeviceClassSubgroup with required parameters and parse the result. + +This sample shows how to call GetBestUpdatesForDeviceClassSubgroup and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetBestUpdatesForDeviceClassSubgroup("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("deviceCount").ToString()); +]]> +This sample shows how to call GetBestUpdatesForDeviceClassSubgroup with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetBestUpdatesForDeviceClassSubgroup("", ""); @@ -942,16 +1323,31 @@ Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProper Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceCount").ToString()); -]]> - +]]> - -This sample shows how to call GetDeploymentForDeviceClassSubgroupAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentForDeviceClassSubgroupAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeploymentForDeviceClassSubgroupAsync("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call GetDeploymentForDeviceClassSubgroupAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentForDeviceClassSubgroupAsync("", "", ""); @@ -975,16 +1371,31 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call GetDeploymentForDeviceClassSubgroup with required parameters and parse the result. + +This sample shows how to call GetDeploymentForDeviceClassSubgroup and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeploymentForDeviceClassSubgroup("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call GetDeploymentForDeviceClassSubgroup with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeploymentForDeviceClassSubgroup("", "", ""); @@ -1008,42 +1419,73 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call DeleteDeploymentForDeviceClassSubgroupAsync with required parameters. + +This sample shows how to call DeleteDeploymentForDeviceClassSubgroupAsync. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentForDeviceClassSubgroupAsync("", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeploymentForDeviceClassSubgroupAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.DeleteDeploymentForDeviceClassSubgroupAsync("", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteDeploymentForDeviceClassSubgroup with required parameters. + +This sample shows how to call DeleteDeploymentForDeviceClassSubgroup. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeploymentForDeviceClassSubgroup("", "", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteDeploymentForDeviceClassSubgroup with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.DeleteDeploymentForDeviceClassSubgroup("", "", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call StopDeploymentAsync with required parameters and parse the result. + +This sample shows how to call StopDeploymentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.StopDeploymentAsync("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call StopDeploymentAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.StopDeploymentAsync("", "", ""); @@ -1067,16 +1509,31 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call StopDeployment with required parameters and parse the result. + +This sample shows how to call StopDeployment and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.StopDeployment("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call StopDeployment with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.StopDeployment("", "", ""); @@ -1100,16 +1557,31 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call RetryDeploymentAsync with required parameters and parse the result. + +This sample shows how to call RetryDeploymentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.RetryDeploymentAsync("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call RetryDeploymentAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.RetryDeploymentAsync("", "", ""); @@ -1133,16 +1605,31 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call RetryDeployment with required parameters and parse the result. + +This sample shows how to call RetryDeployment and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.RetryDeployment("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentId").ToString()); +Console.WriteLine(result.GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("groupId").ToString()); +]]> +This sample shows how to call RetryDeployment with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.RetryDeployment("", "", ""); @@ -1166,16 +1653,28 @@ Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").Get Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); -]]> - +]]> - -This sample shows how to call GetDeviceClassSubgroupDeploymentStatusAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroupDeploymentStatusAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetDeviceClassSubgroupDeploymentStatusAsync("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("deploymentState").ToString()); +]]> +This sample shows how to call GetDeviceClassSubgroupDeploymentStatusAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupDeploymentStatusAsync("", "", ""); @@ -1195,16 +1694,28 @@ Console.WriteLine(result.GetProperty("devicesInProgressCount").ToString()); Console.WriteLine(result.GetProperty("devicesCompletedFailedCount").ToString()); Console.WriteLine(result.GetProperty("devicesCompletedSucceededCount").ToString()); Console.WriteLine(result.GetProperty("devicesCanceledCount").ToString()); -]]> - +]]> - -This sample shows how to call GetDeviceClassSubgroupDeploymentStatus with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroupDeploymentStatus and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetDeviceClassSubgroupDeploymentStatus("", "", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("groupId").ToString()); +Console.WriteLine(result.GetProperty("deviceClassId").ToString()); +Console.WriteLine(result.GetProperty("deploymentState").ToString()); +]]> +This sample shows how to call GetDeviceClassSubgroupDeploymentStatus with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroupDeploymentStatus("", "", ""); @@ -1224,16 +1735,15 @@ Console.WriteLine(result.GetProperty("devicesInProgressCount").ToString()); Console.WriteLine(result.GetProperty("devicesCompletedFailedCount").ToString()); Console.WriteLine(result.GetProperty("devicesCompletedSucceededCount").ToString()); Console.WriteLine(result.GetProperty("devicesCanceledCount").ToString()); -]]> - +]]> - -This sample shows how to call GetOperationStatusAsync with required parameters and parse the result. + +This sample shows how to call GetOperationStatusAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetOperationStatusAsync(""); @@ -1243,13 +1753,13 @@ Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetOperationStatusAsync with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatusAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -Response response = await client.GetOperationStatusAsync("", null); +Response response = await client.GetOperationStatusAsync("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -1265,16 +1775,15 @@ Console.WriteLine(result.GetProperty("traceId").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); -]]> - +]]> - -This sample shows how to call GetOperationStatus with required parameters and parse the result. + +This sample shows how to call GetOperationStatus and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetOperationStatus(""); @@ -1284,13 +1793,13 @@ Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetOperationStatus with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatus with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -Response response = client.GetOperationStatus("", null); +Response response = client.GetOperationStatus("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -1306,48 +1815,51 @@ Console.WriteLine(result.GetProperty("traceId").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); -]]> - +]]> - -This sample shows how to call StartLogCollectionAsync with required parameters and request content, and how to parse the result. -"); -var client = new DeviceManagementClient(endpoint, "", credential); - -var data = new { - deviceList = new[] { - new { - deviceId = "", - } - }, -}; + +This sample shows how to call StartLogCollectionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -Response response = await client.StartLogCollectionAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +} +}, +}); +Response response = await client.StartLogCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); ]]> -This sample shows how to call StartLogCollectionAsync with all parameters and request content, and how to parse the result. +This sample shows how to call StartLogCollectionAsync with all parameters and request content and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); - -var data = new { - operationId = "", - deviceList = new[] { - new { - deviceId = "", - moduleId = "", - } - }, - description = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -Response response = await client.StartLogCollectionAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["operationId"] = "", + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +["moduleId"] = "", +} +}, + ["description"] = "", +}); +Response response = await client.StartLogCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -1357,48 +1869,51 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - +]]> - -This sample shows how to call StartLogCollection with required parameters and request content, and how to parse the result. -"); -var client = new DeviceManagementClient(endpoint, "", credential); - -var data = new { - deviceList = new[] { - new { - deviceId = "", - } - }, -}; + +This sample shows how to call StartLogCollection and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -Response response = client.StartLogCollection("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +} +}, +}); +Response response = client.StartLogCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); ]]> -This sample shows how to call StartLogCollection with all parameters and request content, and how to parse the result. +This sample shows how to call StartLogCollection with all parameters and request content and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); - -var data = new { - operationId = "", - deviceList = new[] { - new { - deviceId = "", - moduleId = "", - } - }, - description = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -Response response = client.StartLogCollection("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["operationId"] = "", + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +["moduleId"] = "", +} +}, + ["description"] = "", +}); +Response response = client.StartLogCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -1408,16 +1923,26 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - +]]> - -This sample shows how to call GetLogCollectionAsync with required parameters and parse the result. + +This sample shows how to call GetLogCollectionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetLogCollectionAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); +]]> +This sample shows how to call GetLogCollectionAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetLogCollectionAsync(""); @@ -1429,16 +1954,26 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - +]]> - -This sample shows how to call GetLogCollection with required parameters and parse the result. + +This sample shows how to call GetLogCollection and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetLogCollection(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); +]]> +This sample shows how to call GetLogCollection with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetLogCollection(""); @@ -1450,16 +1985,26 @@ Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -]]> - +]]> - -This sample shows how to call GetLogCollectionDetailedStatusAsync with required parameters and parse the result. + +This sample shows how to call GetLogCollectionDetailedStatusAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = await client.GetLogCollectionDetailedStatusAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLogCollectionDetailedStatusAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetLogCollectionDetailedStatusAsync(""); @@ -1475,16 +2020,26 @@ Console.WriteLine(result.GetProperty("deviceStatus")[0].GetProperty("resultCode" Console.WriteLine(result.GetProperty("deviceStatus")[0].GetProperty("extendedResultCode").ToString()); Console.WriteLine(result.GetProperty("deviceStatus")[0].GetProperty("logLocation").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); -]]> - +]]> - -This sample shows how to call GetLogCollectionDetailedStatus with required parameters and parse the result. + +This sample shows how to call GetLogCollectionDetailedStatus and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +Response response = client.GetLogCollectionDetailedStatus(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLogCollectionDetailedStatus with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetLogCollectionDetailedStatus(""); @@ -1500,906 +2055,1005 @@ Console.WriteLine(result.GetProperty("deviceStatus")[0].GetProperty("resultCode" Console.WriteLine(result.GetProperty("deviceStatus")[0].GetProperty("extendedResultCode").ToString()); Console.WriteLine(result.GetProperty("deviceStatus")[0].GetProperty("logLocation").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); -]]> - +]]> - + This sample shows how to call GetDeviceClassesAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeviceClassesAsync()) +await foreach (BinaryData item in client.GetDeviceClassesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } ]]> -This sample shows how to call GetDeviceClassesAsync with all parameters, and how to parse the result. +This sample shows how to call GetDeviceClassesAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeviceClassesAsync("")) +await foreach (BinaryData item in client.GetDeviceClassesAsync(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); } -]]> - +]]> - + This sample shows how to call GetDeviceClasses and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeviceClasses()) +foreach (BinaryData item in client.GetDeviceClasses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } ]]> -This sample shows how to call GetDeviceClasses with all parameters, and how to parse the result. +This sample shows how to call GetDeviceClasses with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeviceClasses("")) +foreach (BinaryData item in client.GetDeviceClasses(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); } -]]> - +]]> - -This sample shows how to call GetInstallableUpdatesForDeviceClassesAsync with required parameters and parse the result. + +This sample shows how to call GetInstallableUpdatesForDeviceClassesAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetInstallableUpdatesForDeviceClassesAsync("")) +await foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClassesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); } ]]> - +This sample shows how to call GetInstallableUpdatesForDeviceClassesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClassesAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); +} +]]> - -This sample shows how to call GetInstallableUpdatesForDeviceClasses with required parameters and parse the result. + +This sample shows how to call GetInstallableUpdatesForDeviceClasses and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetInstallableUpdatesForDeviceClasses("")) +foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClasses("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); } ]]> - +This sample shows how to call GetInstallableUpdatesForDeviceClasses with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClasses("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); +} +]]> - + This sample shows how to call GetDevicesAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDevicesAsync()) +await foreach (BinaryData item in client.GetDevicesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); } ]]> -This sample shows how to call GetDevicesAsync with all parameters, and how to parse the result. +This sample shows how to call GetDevicesAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDevicesAsync("")) +await foreach (BinaryData item in client.GetDevicesAsync(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deploymentStatus").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); - Console.WriteLine(result.GetProperty("lastDeploymentId").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentStatus").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); } -]]> - +]]> - + This sample shows how to call GetDevices and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDevices()) +foreach (BinaryData item in client.GetDevices()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); } ]]> -This sample shows how to call GetDevices with all parameters, and how to parse the result. +This sample shows how to call GetDevices with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDevices("")) +foreach (BinaryData item in client.GetDevices(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deploymentStatus").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); - Console.WriteLine(result.GetProperty("lastDeploymentId").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentStatus").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); } -]]> - +]]> - + This sample shows how to call GetGroupsAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetGroupsAsync()) +await foreach (BinaryData item in client.GetGroupsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetGroupsAsync with all parameters, and how to parse the result. +This sample shows how to call GetGroupsAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetGroupsAsync("")) +await foreach (BinaryData item in client.GetGroupsAsync(orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); - Console.WriteLine(result.GetProperty("deployments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); + Console.WriteLine(result[0].GetProperty("deployments")[0].ToString()); } -]]> - +]]> - + This sample shows how to call GetGroups and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetGroups()) +foreach (BinaryData item in client.GetGroups()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetGroups with all parameters, and how to parse the result. +This sample shows how to call GetGroups with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetGroups("")) +foreach (BinaryData item in client.GetGroups(orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); - Console.WriteLine(result.GetProperty("deployments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); + Console.WriteLine(result[0].GetProperty("deployments")[0].ToString()); } -]]> - +]]> - -This sample shows how to call GetBestUpdatesForGroupsAsync with required parameters and parse the result. + +This sample shows how to call GetBestUpdatesForGroupsAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetBestUpdatesForGroupsAsync("")) +await foreach (BinaryData item in client.GetBestUpdatesForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); } ]]> - +This sample shows how to call GetBestUpdatesForGroupsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetBestUpdatesForGroupsAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); +} +]]> - -This sample shows how to call GetBestUpdatesForGroups with required parameters and parse the result. + +This sample shows how to call GetBestUpdatesForGroups and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetBestUpdatesForGroups("")) +foreach (BinaryData item in client.GetBestUpdatesForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); } ]]> - +This sample shows how to call GetBestUpdatesForGroups with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetBestUpdatesForGroups("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); +} +]]> - -This sample shows how to call GetDeploymentsForGroupsAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentsForGroupsAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeploymentsForGroupsAsync("")) +await foreach (BinaryData item in client.GetDeploymentsForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } ]]> -This sample shows how to call GetDeploymentsForGroupsAsync with all parameters, and how to parse the result. +This sample shows how to call GetDeploymentsForGroupsAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeploymentsForGroupsAsync("", "")) +await foreach (BinaryData item in client.GetDeploymentsForGroupsAsync("", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } -]]> - +]]> - -This sample shows how to call GetDeploymentsForGroups with required parameters and parse the result. + +This sample shows how to call GetDeploymentsForGroups and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeploymentsForGroups("")) +foreach (BinaryData item in client.GetDeploymentsForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } ]]> -This sample shows how to call GetDeploymentsForGroups with all parameters, and how to parse the result. +This sample shows how to call GetDeploymentsForGroups with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeploymentsForGroups("", "")) +foreach (BinaryData item in client.GetDeploymentsForGroups("", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } -]]> - +]]> - -This sample shows how to call GetDeviceClassSubgroupsForGroupsAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroupsForGroupsAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeviceClassSubgroupsForGroupsAsync("")) +await foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetDeviceClassSubgroupsForGroupsAsync with all parameters, and how to parse the result. +This sample shows how to call GetDeviceClassSubgroupsForGroupsAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeviceClassSubgroupsForGroupsAsync("", "")) +await foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroupsAsync("", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); } -]]> - +]]> - -This sample shows how to call GetDeviceClassSubgroupsForGroups with required parameters and parse the result. + +This sample shows how to call GetDeviceClassSubgroupsForGroups and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeviceClassSubgroupsForGroups("")) +foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetDeviceClassSubgroupsForGroups with all parameters, and how to parse the result. +This sample shows how to call GetDeviceClassSubgroupsForGroups with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeviceClassSubgroupsForGroups("", "")) +foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroups("", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); } -]]> - +]]> - -This sample shows how to call GetDeploymentsForDeviceClassSubgroupsAsync with required parameters and parse the result. + +This sample shows how to call GetDeploymentsForDeviceClassSubgroupsAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "")) +await foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } ]]> -This sample shows how to call GetDeploymentsForDeviceClassSubgroupsAsync with all parameters, and how to parse the result. +This sample shows how to call GetDeploymentsForDeviceClassSubgroupsAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "", "")) +await foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } -]]> - +]]> - -This sample shows how to call GetDeploymentsForDeviceClassSubgroups with required parameters and parse the result. + +This sample shows how to call GetDeploymentsForDeviceClassSubgroups and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeploymentsForDeviceClassSubgroups("", "")) +foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroups("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } ]]> -This sample shows how to call GetDeploymentsForDeviceClassSubgroups with all parameters, and how to parse the result. +This sample shows how to call GetDeploymentsForDeviceClassSubgroups with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeploymentsForDeviceClassSubgroups("", "", "")) +foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroups("", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } -]]> - +]]> - -This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync with required parameters and parse the result. + +This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "")) +await foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } ]]> -This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync with all parameters, and how to parse the result. +This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "", "")) +await foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } -]]> - +]]> - -This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeployments with required parameters and parse the result. + +This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeployments and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "")) +foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } ]]> -This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeployments with all parameters, and how to parse the result. +This sample shows how to call GetDeviceStatesForDeviceClassSubgroupDeployments with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "", "")) +foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } -]]> - +]]> - + This sample shows how to call GetOperationStatusesAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetOperationStatusesAsync()) +await foreach (BinaryData item in client.GetOperationStatusesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetOperationStatusesAsync with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatusesAsync with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetOperationStatusesAsync("", 1234)) +await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } -]]> - +]]> - + This sample shows how to call GetOperationStatuses and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetOperationStatuses()) +foreach (BinaryData item in client.GetOperationStatuses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetOperationStatuses with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatuses with all parameters and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetOperationStatuses("", 1234)) +foreach (BinaryData item in client.GetOperationStatuses(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } -]]> - +]]> - + This sample shows how to call GetLogCollectionsAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetLogCollectionsAsync()) +await foreach (BinaryData item in client.GetLogCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); } ]]> - +This sample shows how to call GetLogCollectionsAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetLogCollectionsAsync()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); +} +]]> - + This sample shows how to call GetLogCollections and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetLogCollections()) +foreach (BinaryData item in client.GetLogCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); } ]]> - +This sample shows how to call GetLogCollections with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetLogCollections()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); +} +]]> - -This sample shows how to call GetHealthOfDevicesAsync with required parameters and parse the result. + +This sample shows how to call GetHealthOfDevicesAsync and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -await foreach (var item in client.GetHealthOfDevicesAsync("")) +await foreach (BinaryData item in client.GetHealthOfDevicesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("digitalTwinModelId").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("result").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); } ]]> - +This sample shows how to call GetHealthOfDevicesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetHealthOfDevicesAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("digitalTwinModelId").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("result").ToString()); +} +]]> - -This sample shows how to call GetHealthOfDevices with required parameters and parse the result. + +This sample shows how to call GetHealthOfDevices and parse the result. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -foreach (var item in client.GetHealthOfDevices("")) +foreach (BinaryData item in client.GetHealthOfDevices("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("digitalTwinModelId").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("result").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); } ]]> - +This sample shows how to call GetHealthOfDevices with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetHealthOfDevices("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("digitalTwinModelId").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("result").ToString()); +} +]]> - -This sample shows how to call ImportDevicesAsync with required parameters and request content. + +This sample shows how to call ImportDevicesAsync. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -var data = "Devices"; - -var operation = await client.ImportDevicesAsync(WaitUntil.Completed, RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); +RequestContent content = RequestContent.Create("Devices"); +Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); ]]> - +This sample shows how to call ImportDevicesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create("Devices"); +Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); +]]> - -This sample shows how to call ImportDevices with required parameters and request content. + +This sample shows how to call ImportDevices. "); -var client = new DeviceManagementClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); -var data = "Devices"; - -var operation = client.ImportDevices(WaitUntil.Completed, RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); +RequestContent content = RequestContent.Create("Devices"); +Operation operation = client.ImportDevices(WaitUntil.Completed, content); ]]> - +This sample shows how to call ImportDevices with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create("Devices"); +Operation operation = client.ImportDevices(WaitUntil.Completed, content); +]]> \ No newline at end of file diff --git a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml index a7fe9c5eedf3..c8f9c39d08d2 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/Generated/Docs/DeviceUpdateClient.xml @@ -2,12 +2,12 @@ - -This sample shows how to call GetUpdateAsync with required parameters and parse the result. + +This sample shows how to call GetUpdateAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = await client.GetUpdateAsync("", "", ""); @@ -15,18 +15,18 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("manifestVersion").ToString()); Console.WriteLine(result.GetProperty("importedDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetUpdateAsync with all parameters, and how to parse the result. +This sample shows how to call GetUpdateAsync with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Response response = await client.GetUpdateAsync("", "", "", null); +Response response = await client.GetUpdateAsync("", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); @@ -37,7 +37,7 @@ Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("isDeployable").ToString()); Console.WriteLine(result.GetProperty("updateType").ToString()); Console.WriteLine(result.GetProperty("installedCriteria").ToString()); -Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); @@ -54,16 +54,15 @@ Console.WriteLine(result.GetProperty("manifestVersion").ToString()); Console.WriteLine(result.GetProperty("importedDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); -]]> - +]]> - -This sample shows how to call GetUpdate with required parameters and parse the result. + +This sample shows how to call GetUpdate and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = client.GetUpdate("", "", ""); @@ -71,18 +70,18 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("manifestVersion").ToString()); Console.WriteLine(result.GetProperty("importedDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetUpdate with all parameters, and how to parse the result. +This sample shows how to call GetUpdate with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Response response = client.GetUpdate("", "", "", null); +Response response = client.GetUpdate("", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); @@ -93,7 +92,7 @@ Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("isDeployable").ToString()); Console.WriteLine(result.GetProperty("updateType").ToString()); Console.WriteLine(result.GetProperty("installedCriteria").ToString()); -Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); @@ -110,16 +109,15 @@ Console.WriteLine(result.GetProperty("manifestVersion").ToString()); Console.WriteLine(result.GetProperty("importedDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); -]]> - +]]> - -This sample shows how to call GetFileAsync with required parameters and parse the result. + +This sample shows how to call GetFileAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = await client.GetFileAsync("", "", "", ""); @@ -127,44 +125,43 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); -Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); ]]> -This sample shows how to call GetFileAsync with all parameters, and how to parse the result. +This sample shows how to call GetFileAsync with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Response response = await client.GetFileAsync("", "", "", "", null); +Response response = await client.GetFileAsync("", "", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("sizeInBytes").ToString()); -Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanDetails").ToString()); -Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("downloadHandler").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); -Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("scanDetails").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetFile with required parameters and parse the result. + +This sample shows how to call GetFile and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = client.GetFile("", "", "", ""); @@ -172,44 +169,43 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); -Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); ]]> -This sample shows how to call GetFile with all parameters, and how to parse the result. +This sample shows how to call GetFile with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Response response = client.GetFile("", "", "", "", null); +Response response = client.GetFile("", "", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("sizeInBytes").ToString()); -Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanDetails").ToString()); -Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("downloadHandler").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); -Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("scanDetails").ToString()); -Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); -]]> - +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +]]> - -This sample shows how to call GetOperationStatusAsync with required parameters and parse the result. + +This sample shows how to call GetOperationStatusAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = await client.GetOperationStatusAsync(""); @@ -219,13 +215,13 @@ Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetOperationStatusAsync with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatusAsync with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Response response = await client.GetOperationStatusAsync("", null); +Response response = await client.GetOperationStatusAsync("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -247,16 +243,15 @@ Console.WriteLine(result.GetProperty("traceId").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); -]]> - +]]> - -This sample shows how to call GetOperationStatus with required parameters and parse the result. + +This sample shows how to call GetOperationStatus and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = client.GetOperationStatus(""); @@ -266,13 +261,13 @@ Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); ]]> -This sample shows how to call GetOperationStatus with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatus with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Response response = client.GetOperationStatus("", null); +Response response = client.GetOperationStatus("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -294,468 +289,587 @@ Console.WriteLine(result.GetProperty("traceId").ToString()); Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); -]]> - +]]> - + This sample shows how to call GetUpdatesAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetUpdatesAsync()) +await foreach (BinaryData item in client.GetUpdatesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetUpdatesAsync with all parameters, and how to parse the result. +This sample shows how to call GetUpdatesAsync with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetUpdatesAsync("", "")) +await foreach (BinaryData item in client.GetUpdatesAsync(search: "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("isDeployable").ToString()); - Console.WriteLine(result.GetProperty("updateType").ToString()); - Console.WriteLine(result.GetProperty("installedCriteria").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("scanResult").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("isDeployable").ToString()); + Console.WriteLine(result[0].GetProperty("updateType").ToString()); + Console.WriteLine(result[0].GetProperty("installedCriteria").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("scanResult").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } -]]> - +]]> - + This sample shows how to call GetUpdates and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetUpdates()) +foreach (BinaryData item in client.GetUpdates()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetUpdates with all parameters, and how to parse the result. +This sample shows how to call GetUpdates with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetUpdates("", "")) +foreach (BinaryData item in client.GetUpdates(search: "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("isDeployable").ToString()); - Console.WriteLine(result.GetProperty("updateType").ToString()); - Console.WriteLine(result.GetProperty("installedCriteria").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("scanResult").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("isDeployable").ToString()); + Console.WriteLine(result[0].GetProperty("updateType").ToString()); + Console.WriteLine(result[0].GetProperty("installedCriteria").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("scanResult").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } -]]> - +]]> - + This sample shows how to call GetProvidersAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetProvidersAsync()) +await foreach (BinaryData item in client.GetProvidersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetProvidersAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetProvidersAsync()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].ToString()); +} +]]> - + This sample shows how to call GetProviders and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetProviders()) +foreach (BinaryData item in client.GetProviders()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetProviders with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetProviders()) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].ToString()); +} +]]> - -This sample shows how to call GetNamesAsync with required parameters and parse the result. + +This sample shows how to call GetNamesAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetNamesAsync("")) +await foreach (BinaryData item in client.GetNamesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetNamesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetNamesAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].ToString()); +} +]]> - -This sample shows how to call GetNames with required parameters and parse the result. + +This sample shows how to call GetNames and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetNames("")) +foreach (BinaryData item in client.GetNames("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetNames with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetNames("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].ToString()); +} +]]> - -This sample shows how to call GetVersionsAsync with required parameters and parse the result. + +This sample shows how to call GetVersionsAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetVersionsAsync("", "")) +await foreach (BinaryData item in client.GetVersionsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetVersionsAsync with all parameters, and how to parse the result. +This sample shows how to call GetVersionsAsync with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetVersionsAsync("", "", "")) +await foreach (BinaryData item in client.GetVersionsAsync("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } -]]> - +]]> - -This sample shows how to call GetVersions with required parameters and parse the result. + +This sample shows how to call GetVersions and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetVersions("", "")) +foreach (BinaryData item in client.GetVersions("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetVersions with all parameters, and how to parse the result. +This sample shows how to call GetVersions with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetVersions("", "", "")) +foreach (BinaryData item in client.GetVersions("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } -]]> - +]]> - -This sample shows how to call GetFilesAsync with required parameters and parse the result. + +This sample shows how to call GetFilesAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetFilesAsync("", "", "")) +await foreach (BinaryData item in client.GetFilesAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFilesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetFilesAsync("", "", "")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].ToString()); +} +]]> - -This sample shows how to call GetFiles with required parameters and parse the result. + +This sample shows how to call GetFiles and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetFiles("", "", "")) +foreach (BinaryData item in client.GetFiles("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetFiles with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetFiles("", "", "")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].ToString()); +} +]]> - + This sample shows how to call GetOperationStatusesAsync and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetOperationStatusesAsync()) +await foreach (BinaryData item in client.GetOperationStatusesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetOperationStatusesAsync with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatusesAsync with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -await foreach (var item in client.GetOperationStatusesAsync("", 1234)) +await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("resourceLocation").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } -]]> - +]]> - + This sample shows how to call GetOperationStatuses and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetOperationStatuses()) +foreach (BinaryData item in client.GetOperationStatuses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } ]]> -This sample shows how to call GetOperationStatuses with all parameters, and how to parse the result. +This sample shows how to call GetOperationStatuses with all parameters and parse the result. "); -var client = new DeviceUpdateClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -foreach (var item in client.GetOperationStatuses("", 1234)) +foreach (BinaryData item in client.GetOperationStatuses(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("resourceLocation").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } -]]> - +]]> - -This sample shows how to call DeleteUpdateAsync with required parameters. + +This sample shows how to call DeleteUpdateAsync. "); -var client = new DeviceUpdateClient(endpoint, "", credential); - -var operation = await client.DeleteUpdateAsync(WaitUntil.Completed, "", "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = await client.DeleteUpdateAsync(WaitUntil.Completed, "", "", ""); ]]> - +This sample shows how to call DeleteUpdateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +Operation operation = await client.DeleteUpdateAsync(WaitUntil.Completed, "", "", ""); +]]> - -This sample shows how to call DeleteUpdate with required parameters. + +This sample shows how to call DeleteUpdate. "); -var client = new DeviceUpdateClient(endpoint, "", credential); - -var operation = client.DeleteUpdate(WaitUntil.Completed, "", "", ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); -Console.WriteLine(operation.GetRawResponse().Status); +Operation operation = client.DeleteUpdate(WaitUntil.Completed, "", "", ""); ]]> - +This sample shows how to call DeleteUpdate with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +Operation operation = client.DeleteUpdate(WaitUntil.Completed, "", "", ""); +]]> - -This sample shows how to call StartImportUpdateAsync with required parameters and request content. -"); -var client = new DeviceUpdateClient(endpoint, "", credential); - -var data = new[] { - new { - importManifest = new { - url = "", - sizeInBytes = 1234L, - hashes = new { - key = "", - }, - }, - friendlyName = "", - files = new[] { - new { - filename = "", - url = "", - } - }, - } -}; - -var operation = await client.StartImportUpdateAsync(WaitUntil.Completed, RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); + +This sample shows how to call StartImportUpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +} +}); +Operation operation = await client.StartImportUpdateAsync(WaitUntil.Completed, content); ]]> - +This sample shows how to call StartImportUpdateAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +["friendlyName"] = "", +["files"] = new List() +{ +new Dictionary() +{ +["filename"] = "", +["url"] = "", +} +}, +} +}); +Operation operation = await client.StartImportUpdateAsync(WaitUntil.Completed, content); +]]> - -This sample shows how to call StartImportUpdate with required parameters and request content. -"); -var client = new DeviceUpdateClient(endpoint, "", credential); - -var data = new[] { - new { - importManifest = new { - url = "", - sizeInBytes = 1234L, - hashes = new { - key = "", - }, - }, - friendlyName = "", - files = new[] { - new { - filename = "", - url = "", - } - }, - } -}; - -var operation = client.StartImportUpdate(WaitUntil.Completed, RequestContent.Create(data)); - -Console.WriteLine(operation.GetRawResponse().Status); + +This sample shows how to call StartImportUpdate. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +} +}); +Operation operation = client.StartImportUpdate(WaitUntil.Completed, content); ]]> - +This sample shows how to call StartImportUpdate with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +["friendlyName"] = "", +["files"] = new List() +{ +new Dictionary() +{ +["filename"] = "", +["url"] = "", +} +}, +} +}); +Operation operation = client.StartImportUpdate(WaitUntil.Completed, content); +]]> \ No newline at end of file diff --git a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceManagementClient.cs b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceManagementClient.cs index bb55a61f73a4..7cf897028404 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceManagementClient.cs +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceManagementClient.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.IoT.DeviceUpdate; using NUnit.Framework; namespace Azure.IoT.DeviceUpdate.Samples @@ -23,24 +23,24 @@ public class Samples_DeviceManagementClient [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClass() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClass(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClass_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClass(""); @@ -49,7 +49,7 @@ public void Example_GetDeviceClass_AllParameters() Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); @@ -61,24 +61,24 @@ public void Example_GetDeviceClass_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClass_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClass_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassAsync(""); @@ -87,7 +87,7 @@ public async Task Example_GetDeviceClass_AllParameters_Async() Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); @@ -99,43 +99,41 @@ public async Task Example_GetDeviceClass_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateDeviceClass() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = client.UpdateDeviceClass("", RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = client.UpdateDeviceClass("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_UpdateDeviceClass_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = client.UpdateDeviceClass("", RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = client.UpdateDeviceClass("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); @@ -147,43 +145,41 @@ public void Example_UpdateDeviceClass_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateDeviceClass_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = await client.UpdateDeviceClassAsync("", RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = await client.UpdateDeviceClassAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_UpdateDeviceClass_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = await client.UpdateDeviceClassAsync("", RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = await client.UpdateDeviceClassAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceClassId").ToString()); Console.WriteLine(result.GetProperty("friendlyName").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); @@ -195,9 +191,9 @@ public async Task Example_UpdateDeviceClass_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeviceClass() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClass(""); Console.WriteLine(response.Status); @@ -207,9 +203,9 @@ public void Example_DeleteDeviceClass() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeviceClass_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClass(""); Console.WriteLine(response.Status); @@ -219,9 +215,9 @@ public void Example_DeleteDeviceClass_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeviceClass_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassAsync(""); Console.WriteLine(response.Status); @@ -231,9 +227,9 @@ public async Task Example_DeleteDeviceClass_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeviceClass_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassAsync(""); Console.WriteLine(response.Status); @@ -243,9 +239,9 @@ public async Task Example_DeleteDeviceClass_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDevice() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDevice(""); @@ -259,9 +255,9 @@ public void Example_GetDevice() [Ignore("Only validating compilation of examples")] public void Example_GetDevice_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDevice(""); @@ -301,9 +297,9 @@ public void Example_GetDevice_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevice_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceAsync(""); @@ -317,9 +313,9 @@ public async Task Example_GetDevice_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevice_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceAsync(""); @@ -359,9 +355,9 @@ public async Task Example_GetDevice_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceModule() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceModule("", ""); @@ -375,9 +371,9 @@ public void Example_GetDeviceModule() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceModule_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceModule("", ""); @@ -417,9 +413,9 @@ public void Example_GetDeviceModule_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceModule_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceModuleAsync("", ""); @@ -433,9 +429,9 @@ public async Task Example_GetDeviceModule_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceModule_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceModuleAsync("", ""); @@ -475,9 +471,9 @@ public async Task Example_GetDeviceModule_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateCompliance() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetUpdateCompliance(); @@ -492,9 +488,9 @@ public void Example_GetUpdateCompliance() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateCompliance_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetUpdateCompliance(); @@ -509,9 +505,9 @@ public void Example_GetUpdateCompliance_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateCompliance_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetUpdateComplianceAsync(); @@ -526,9 +522,9 @@ public async Task Example_GetUpdateCompliance_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateCompliance_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetUpdateComplianceAsync(); @@ -543,9 +539,9 @@ public async Task Example_GetUpdateCompliance_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetGroup(""); @@ -559,9 +555,9 @@ public void Example_GetGroup() [Ignore("Only validating compilation of examples")] public void Example_GetGroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetGroup(""); @@ -580,9 +576,9 @@ public void Example_GetGroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetGroupAsync(""); @@ -596,9 +592,9 @@ public async Task Example_GetGroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetGroupAsync(""); @@ -617,9 +613,9 @@ public async Task Example_GetGroup_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteGroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteGroup(""); Console.WriteLine(response.Status); @@ -629,9 +625,9 @@ public void Example_DeleteGroup() [Ignore("Only validating compilation of examples")] public void Example_DeleteGroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteGroup(""); Console.WriteLine(response.Status); @@ -641,9 +637,9 @@ public void Example_DeleteGroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteGroupAsync(""); Console.WriteLine(response.Status); @@ -653,9 +649,9 @@ public async Task Example_DeleteGroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteGroupAsync(""); Console.WriteLine(response.Status); @@ -665,9 +661,9 @@ public async Task Example_DeleteGroup_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateComplianceForGroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetUpdateComplianceForGroup(""); @@ -682,9 +678,9 @@ public void Example_GetUpdateComplianceForGroup() [Ignore("Only validating compilation of examples")] public void Example_GetUpdateComplianceForGroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetUpdateComplianceForGroup(""); @@ -699,9 +695,9 @@ public void Example_GetUpdateComplianceForGroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateComplianceForGroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetUpdateComplianceForGroupAsync(""); @@ -716,9 +712,9 @@ public async Task Example_GetUpdateComplianceForGroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdateComplianceForGroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetUpdateComplianceForGroupAsync(""); @@ -733,9 +729,9 @@ public async Task Example_GetUpdateComplianceForGroup_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeployment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeployment("", ""); @@ -752,9 +748,9 @@ public void Example_GetDeployment() [Ignore("Only validating compilation of examples")] public void Example_GetDeployment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeployment("", ""); @@ -784,9 +780,9 @@ public void Example_GetDeployment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentAsync("", ""); @@ -803,9 +799,9 @@ public async Task Example_GetDeployment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeployment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentAsync("", ""); @@ -835,27 +831,26 @@ public async Task Example_GetDeployment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateDeployment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() { - updateId = new + ["updateId"] = new Dictionary() { - provider = "", - name = "", - version = "", + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", - }; - - Response response = client.CreateOrUpdateDeployment("", "", RequestContent.Create(data)); + ["groupId"] = "", + }); + Response response = client.CreateOrUpdateDeployment("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -870,50 +865,43 @@ public void Example_CreateOrUpdateDeployment() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateDeployment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() { - updateId = new + ["updateId"] = new Dictionary() { - provider = "", - name = "", - version = "", + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", - deviceClassSubgroups = new[] { - "" - }, - isCanceled = true, - isRetried = true, - rollbackPolicy = new + ["groupId"] = "", + ["deviceClassSubgroups"] = new List() +{ +"" +}, + ["isCanceled"] = true, + ["isRetried"] = true, + ["rollbackPolicy"] = new Dictionary() { - update = new + ["update"] = null + , + ["failure"] = new Dictionary() { - updateId = new - { - provider = "", - name = "", - version = "", - }, - }, - failure = new - { - devicesFailedPercentage = 1234, - devicesFailedCount = 1234, + ["devicesFailedPercentage"] = 1234, + ["devicesFailedCount"] = 1234, }, }, - isCloudInitiatedRollback = true, - }; - - Response response = client.CreateOrUpdateDeployment("", "", RequestContent.Create(data)); + ["isCloudInitiatedRollback"] = true, + }); + Response response = client.CreateOrUpdateDeployment("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -941,27 +929,26 @@ public void Example_CreateOrUpdateDeployment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateDeployment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() { - updateId = new + ["updateId"] = new Dictionary() { - provider = "", - name = "", - version = "", + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", - }; - - Response response = await client.CreateOrUpdateDeploymentAsync("", "", RequestContent.Create(data)); + ["groupId"] = "", + }); + Response response = await client.CreateOrUpdateDeploymentAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -976,50 +963,43 @@ public async Task Example_CreateOrUpdateDeployment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateDeployment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deploymentId = "", - startDateTime = "2022-05-10T18:57:31.2311892Z", - update = new + ["deploymentId"] = "", + ["startDateTime"] = "2022-05-10T18:57:31.2311892Z", + ["update"] = new Dictionary() { - updateId = new + ["updateId"] = new Dictionary() { - provider = "", - name = "", - version = "", + ["provider"] = "", + ["name"] = "", + ["version"] = "", }, }, - groupId = "", - deviceClassSubgroups = new[] { - "" - }, - isCanceled = true, - isRetried = true, - rollbackPolicy = new + ["groupId"] = "", + ["deviceClassSubgroups"] = new List() +{ +"" +}, + ["isCanceled"] = true, + ["isRetried"] = true, + ["rollbackPolicy"] = new Dictionary() { - update = new + ["update"] = null + , + ["failure"] = new Dictionary() { - updateId = new - { - provider = "", - name = "", - version = "", - }, - }, - failure = new - { - devicesFailedPercentage = 1234, - devicesFailedCount = 1234, + ["devicesFailedPercentage"] = 1234, + ["devicesFailedCount"] = 1234, }, }, - isCloudInitiatedRollback = true, - }; - - Response response = await client.CreateOrUpdateDeploymentAsync("", "", RequestContent.Create(data)); + ["isCloudInitiatedRollback"] = true, + }); + Response response = await client.CreateOrUpdateDeploymentAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deploymentId").ToString()); @@ -1047,9 +1027,9 @@ public async Task Example_CreateOrUpdateDeployment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeployment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeployment("", ""); Console.WriteLine(response.Status); @@ -1059,9 +1039,9 @@ public void Example_DeleteDeployment() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeployment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeployment("", ""); Console.WriteLine(response.Status); @@ -1071,9 +1051,9 @@ public void Example_DeleteDeployment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeployment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentAsync("", ""); Console.WriteLine(response.Status); @@ -1083,9 +1063,9 @@ public async Task Example_DeleteDeployment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeployment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentAsync("", ""); Console.WriteLine(response.Status); @@ -1095,9 +1075,9 @@ public async Task Example_DeleteDeployment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentStatus() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeploymentStatus("", ""); @@ -1113,9 +1093,9 @@ public void Example_GetDeploymentStatus() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentStatus_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeploymentStatus("", ""); @@ -1150,9 +1130,9 @@ public void Example_GetDeploymentStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentStatus_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentStatusAsync("", ""); @@ -1168,9 +1148,9 @@ public async Task Example_GetDeploymentStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentStatus_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentStatusAsync("", ""); @@ -1205,9 +1185,9 @@ public async Task Example_GetDeploymentStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroup("", ""); @@ -1221,9 +1201,9 @@ public void Example_GetDeviceClassSubgroup() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroup("", ""); @@ -1239,9 +1219,9 @@ public void Example_GetDeviceClassSubgroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupAsync("", ""); @@ -1255,9 +1235,9 @@ public async Task Example_GetDeviceClassSubgroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupAsync("", ""); @@ -1273,9 +1253,9 @@ public async Task Example_GetDeviceClassSubgroup_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeviceClassSubgroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClassSubgroup("", ""); Console.WriteLine(response.Status); @@ -1285,9 +1265,9 @@ public void Example_DeleteDeviceClassSubgroup() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeviceClassSubgroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeviceClassSubgroup("", ""); Console.WriteLine(response.Status); @@ -1297,9 +1277,9 @@ public void Example_DeleteDeviceClassSubgroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeviceClassSubgroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassSubgroupAsync("", ""); Console.WriteLine(response.Status); @@ -1309,9 +1289,9 @@ public async Task Example_DeleteDeviceClassSubgroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeviceClassSubgroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeviceClassSubgroupAsync("", ""); Console.WriteLine(response.Status); @@ -1321,9 +1301,9 @@ public async Task Example_DeleteDeviceClassSubgroup_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroupUpdateCompliance() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroupUpdateCompliance("", ""); @@ -1338,9 +1318,9 @@ public void Example_GetDeviceClassSubgroupUpdateCompliance() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroupUpdateCompliance_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroupUpdateCompliance("", ""); @@ -1355,9 +1335,9 @@ public void Example_GetDeviceClassSubgroupUpdateCompliance_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroupUpdateCompliance_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupUpdateComplianceAsync("", ""); @@ -1372,9 +1352,9 @@ public async Task Example_GetDeviceClassSubgroupUpdateCompliance_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroupUpdateCompliance_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupUpdateComplianceAsync("", ""); @@ -1389,9 +1369,9 @@ public async Task Example_GetDeviceClassSubgroupUpdateCompliance_AllParameters_A [Ignore("Only validating compilation of examples")] public void Example_GetBestUpdatesForDeviceClassSubgroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetBestUpdatesForDeviceClassSubgroup("", ""); @@ -1408,9 +1388,9 @@ public void Example_GetBestUpdatesForDeviceClassSubgroup() [Ignore("Only validating compilation of examples")] public void Example_GetBestUpdatesForDeviceClassSubgroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetBestUpdatesForDeviceClassSubgroup("", ""); @@ -1429,9 +1409,9 @@ public void Example_GetBestUpdatesForDeviceClassSubgroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetBestUpdatesForDeviceClassSubgroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetBestUpdatesForDeviceClassSubgroupAsync("", ""); @@ -1448,9 +1428,9 @@ public async Task Example_GetBestUpdatesForDeviceClassSubgroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetBestUpdatesForDeviceClassSubgroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetBestUpdatesForDeviceClassSubgroupAsync("", ""); @@ -1469,9 +1449,9 @@ public async Task Example_GetBestUpdatesForDeviceClassSubgroup_AllParameters_Asy [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentForDeviceClassSubgroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeploymentForDeviceClassSubgroup("", "", ""); @@ -1488,9 +1468,9 @@ public void Example_GetDeploymentForDeviceClassSubgroup() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentForDeviceClassSubgroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeploymentForDeviceClassSubgroup("", "", ""); @@ -1520,9 +1500,9 @@ public void Example_GetDeploymentForDeviceClassSubgroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentForDeviceClassSubgroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentForDeviceClassSubgroupAsync("", "", ""); @@ -1539,9 +1519,9 @@ public async Task Example_GetDeploymentForDeviceClassSubgroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentForDeviceClassSubgroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeploymentForDeviceClassSubgroupAsync("", "", ""); @@ -1571,9 +1551,9 @@ public async Task Example_GetDeploymentForDeviceClassSubgroup_AllParameters_Asyn [Ignore("Only validating compilation of examples")] public void Example_DeleteDeploymentForDeviceClassSubgroup() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeploymentForDeviceClassSubgroup("", "", ""); Console.WriteLine(response.Status); @@ -1583,9 +1563,9 @@ public void Example_DeleteDeploymentForDeviceClassSubgroup() [Ignore("Only validating compilation of examples")] public void Example_DeleteDeploymentForDeviceClassSubgroup_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.DeleteDeploymentForDeviceClassSubgroup("", "", ""); Console.WriteLine(response.Status); @@ -1595,9 +1575,9 @@ public void Example_DeleteDeploymentForDeviceClassSubgroup_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeploymentForDeviceClassSubgroup_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentForDeviceClassSubgroupAsync("", "", ""); Console.WriteLine(response.Status); @@ -1607,9 +1587,9 @@ public async Task Example_DeleteDeploymentForDeviceClassSubgroup_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteDeploymentForDeviceClassSubgroup_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.DeleteDeploymentForDeviceClassSubgroupAsync("", "", ""); Console.WriteLine(response.Status); @@ -1619,9 +1599,9 @@ public async Task Example_DeleteDeploymentForDeviceClassSubgroup_AllParameters_A [Ignore("Only validating compilation of examples")] public void Example_StopDeployment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.StopDeployment("", "", ""); @@ -1638,9 +1618,9 @@ public void Example_StopDeployment() [Ignore("Only validating compilation of examples")] public void Example_StopDeployment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.StopDeployment("", "", ""); @@ -1670,9 +1650,9 @@ public void Example_StopDeployment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_StopDeployment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.StopDeploymentAsync("", "", ""); @@ -1689,9 +1669,9 @@ public async Task Example_StopDeployment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_StopDeployment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.StopDeploymentAsync("", "", ""); @@ -1721,9 +1701,9 @@ public async Task Example_StopDeployment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_RetryDeployment() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.RetryDeployment("", "", ""); @@ -1740,9 +1720,9 @@ public void Example_RetryDeployment() [Ignore("Only validating compilation of examples")] public void Example_RetryDeployment_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.RetryDeployment("", "", ""); @@ -1772,9 +1752,9 @@ public void Example_RetryDeployment_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_RetryDeployment_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.RetryDeploymentAsync("", "", ""); @@ -1791,9 +1771,9 @@ public async Task Example_RetryDeployment_Async() [Ignore("Only validating compilation of examples")] public async Task Example_RetryDeployment_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.RetryDeploymentAsync("", "", ""); @@ -1823,9 +1803,9 @@ public async Task Example_RetryDeployment_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroupDeploymentStatus() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroupDeploymentStatus("", "", ""); @@ -1839,9 +1819,9 @@ public void Example_GetDeviceClassSubgroupDeploymentStatus() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroupDeploymentStatus_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetDeviceClassSubgroupDeploymentStatus("", "", ""); @@ -1867,9 +1847,9 @@ public void Example_GetDeviceClassSubgroupDeploymentStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroupDeploymentStatus_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupDeploymentStatusAsync("", "", ""); @@ -1883,9 +1863,9 @@ public async Task Example_GetDeviceClassSubgroupDeploymentStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroupDeploymentStatus_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetDeviceClassSubgroupDeploymentStatusAsync("", "", ""); @@ -1911,9 +1891,9 @@ public async Task Example_GetDeviceClassSubgroupDeploymentStatus_AllParameters_A [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatus() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetOperationStatus(""); @@ -1928,11 +1908,11 @@ public void Example_GetOperationStatus() [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatus_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - Response response = client.GetOperationStatus("", null); + Response response = client.GetOperationStatus("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -1954,9 +1934,9 @@ public void Example_GetOperationStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatus_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetOperationStatusAsync(""); @@ -1971,11 +1951,11 @@ public async Task Example_GetOperationStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatus_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - Response response = await client.GetOperationStatusAsync("", null); + Response response = await client.GetOperationStatusAsync("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -1997,20 +1977,21 @@ public async Task Example_GetOperationStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_StartLogCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deviceList = new[] { - new { - deviceId = "", - } - }, - }; - - Response response = client.StartLogCollection("", RequestContent.Create(data)); + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +} +}, + }); + Response response = client.StartLogCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); @@ -2020,23 +2001,24 @@ public void Example_StartLogCollection() [Ignore("Only validating compilation of examples")] public void Example_StartLogCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - operationId = "", - deviceList = new[] { - new { - deviceId = "", - moduleId = "", - } - }, - description = "", - }; - - Response response = client.StartLogCollection("", RequestContent.Create(data)); + ["operationId"] = "", + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +["moduleId"] = "", +} +}, + ["description"] = "", + }); + Response response = client.StartLogCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -2052,20 +2034,21 @@ public void Example_StartLogCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_StartLogCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - deviceList = new[] { - new { - deviceId = "", - } - }, - }; - - Response response = await client.StartLogCollectionAsync("", RequestContent.Create(data)); + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +} +}, + }); + Response response = await client.StartLogCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); @@ -2075,23 +2058,24 @@ public async Task Example_StartLogCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_StartLogCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - operationId = "", - deviceList = new[] { - new { - deviceId = "", - moduleId = "", - } - }, - description = "", - }; - - Response response = await client.StartLogCollectionAsync("", RequestContent.Create(data)); + ["operationId"] = "", + ["deviceList"] = new List() +{ +new Dictionary() +{ +["deviceId"] = "", +["moduleId"] = "", +} +}, + ["description"] = "", + }); + Response response = await client.StartLogCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -2107,9 +2091,9 @@ public async Task Example_StartLogCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetLogCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetLogCollection(""); @@ -2121,9 +2105,9 @@ public void Example_GetLogCollection() [Ignore("Only validating compilation of examples")] public void Example_GetLogCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetLogCollection(""); @@ -2141,9 +2125,9 @@ public void Example_GetLogCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLogCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetLogCollectionAsync(""); @@ -2155,9 +2139,9 @@ public async Task Example_GetLogCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLogCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetLogCollectionAsync(""); @@ -2175,9 +2159,9 @@ public async Task Example_GetLogCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetLogCollectionDetailedStatus() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetLogCollectionDetailedStatus(""); @@ -2189,9 +2173,9 @@ public void Example_GetLogCollectionDetailedStatus() [Ignore("Only validating compilation of examples")] public void Example_GetLogCollectionDetailedStatus_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = client.GetLogCollectionDetailedStatus(""); @@ -2213,9 +2197,9 @@ public void Example_GetLogCollectionDetailedStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLogCollectionDetailedStatus_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetLogCollectionDetailedStatusAsync(""); @@ -2227,9 +2211,9 @@ public async Task Example_GetLogCollectionDetailedStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLogCollectionDetailedStatus_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); Response response = await client.GetLogCollectionDetailedStatusAsync(""); @@ -2251,15 +2235,15 @@ public async Task Example_GetLogCollectionDetailedStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClasses() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeviceClasses()) + foreach (BinaryData item in client.GetDeviceClasses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } } @@ -2267,23 +2251,23 @@ public void Example_GetDeviceClasses() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClasses_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeviceClasses("")) + foreach (BinaryData item in client.GetDeviceClasses(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); } } @@ -2291,15 +2275,15 @@ public void Example_GetDeviceClasses_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClasses_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeviceClassesAsync()) + await foreach (BinaryData item in client.GetDeviceClassesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); } } @@ -2307,23 +2291,23 @@ public async Task Example_GetDeviceClasses_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClasses_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeviceClassesAsync("")) + await foreach (BinaryData item in client.GetDeviceClassesAsync(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("contractModel").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassProperties").GetProperty("compatProperties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("bestCompatibleUpdate").GetProperty("friendlyName").ToString()); } } @@ -2331,16 +2315,16 @@ public async Task Example_GetDeviceClasses_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetInstallableUpdatesForDeviceClasses() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetInstallableUpdatesForDeviceClasses("")) + foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClasses("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); } } @@ -2348,18 +2332,18 @@ public void Example_GetInstallableUpdatesForDeviceClasses() [Ignore("Only validating compilation of examples")] public void Example_GetInstallableUpdatesForDeviceClasses_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetInstallableUpdatesForDeviceClasses("")) + foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClasses("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); } } @@ -2367,16 +2351,16 @@ public void Example_GetInstallableUpdatesForDeviceClasses_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetInstallableUpdatesForDeviceClasses_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetInstallableUpdatesForDeviceClassesAsync("")) + await foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClassesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); } } @@ -2384,18 +2368,18 @@ public async Task Example_GetInstallableUpdatesForDeviceClasses_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetInstallableUpdatesForDeviceClasses_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetInstallableUpdatesForDeviceClassesAsync("")) + await foreach (BinaryData item in client.GetInstallableUpdatesForDeviceClassesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); } } @@ -2403,16 +2387,16 @@ public async Task Example_GetInstallableUpdatesForDeviceClasses_AllParameters_As [Ignore("Only validating compilation of examples")] public void Example_GetDevices() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDevices()) + foreach (BinaryData item in client.GetDevices()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); } } @@ -2420,42 +2404,42 @@ public void Example_GetDevices() [Ignore("Only validating compilation of examples")] public void Example_GetDevices_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDevices("")) + foreach (BinaryData item in client.GetDevices(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deploymentStatus").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); - Console.WriteLine(result.GetProperty("lastDeploymentId").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentStatus").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); } } @@ -2463,16 +2447,16 @@ public void Example_GetDevices_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevices_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDevicesAsync()) + await foreach (BinaryData item in client.GetDevicesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); } } @@ -2480,42 +2464,42 @@ public async Task Example_GetDevices_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDevices_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDevicesAsync("")) + await foreach (BinaryData item in client.GetDevicesAsync(filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deploymentStatus").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("onLatestUpdate").ToString()); - Console.WriteLine(result.GetProperty("lastDeploymentId").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); - Console.WriteLine(result.GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastAttemptedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentStatus").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("installedUpdate").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("onLatestUpdate").ToString()); + Console.WriteLine(result[0].GetProperty("lastDeploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("resultDetails").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("extendedResultCode").ToString()); + Console.WriteLine(result[0].GetProperty("lastInstallResult").GetProperty("stepResults")[0].GetProperty("resultDetails").ToString()); } } @@ -2523,16 +2507,16 @@ public async Task Example_GetDevices_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGroups() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetGroups()) + foreach (BinaryData item in client.GetGroups()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -2540,21 +2524,21 @@ public void Example_GetGroups() [Ignore("Only validating compilation of examples")] public void Example_GetGroups_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetGroups("")) + foreach (BinaryData item in client.GetGroups(orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); - Console.WriteLine(result.GetProperty("deployments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); + Console.WriteLine(result[0].GetProperty("deployments")[0].ToString()); } } @@ -2562,16 +2546,16 @@ public void Example_GetGroups_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGroups_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetGroupsAsync()) + await foreach (BinaryData item in client.GetGroupsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -2579,21 +2563,21 @@ public async Task Example_GetGroups_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGroups_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetGroupsAsync("")) + await foreach (BinaryData item in client.GetGroupsAsync(orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("groupType").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); - Console.WriteLine(result.GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); - Console.WriteLine(result.GetProperty("deployments")[0].ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("groupType").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithNewUpdatesAvailableCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithUpdatesInProgressCount").ToString()); + Console.WriteLine(result[0].GetProperty("subgroupsWithOnLatestUpdateCount").ToString()); + Console.WriteLine(result[0].GetProperty("deployments")[0].ToString()); } } @@ -2601,19 +2585,19 @@ public async Task Example_GetGroups_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetBestUpdatesForGroups() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetBestUpdatesForGroups("")) + foreach (BinaryData item in client.GetBestUpdatesForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); } } @@ -2621,21 +2605,21 @@ public void Example_GetBestUpdatesForGroups() [Ignore("Only validating compilation of examples")] public void Example_GetBestUpdatesForGroups_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetBestUpdatesForGroups("")) + foreach (BinaryData item in client.GetBestUpdatesForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); } } @@ -2643,19 +2627,19 @@ public void Example_GetBestUpdatesForGroups_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetBestUpdatesForGroups_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetBestUpdatesForGroupsAsync("")) + await foreach (BinaryData item in client.GetBestUpdatesForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); } } @@ -2663,21 +2647,21 @@ public async Task Example_GetBestUpdatesForGroups_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetBestUpdatesForGroups_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetBestUpdatesForGroupsAsync("")) + await foreach (BinaryData item in client.GetBestUpdatesForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); } } @@ -2685,19 +2669,19 @@ public async Task Example_GetBestUpdatesForGroups_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentsForGroups() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeploymentsForGroups("")) + foreach (BinaryData item in client.GetDeploymentsForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } } @@ -2705,32 +2689,32 @@ public void Example_GetDeploymentsForGroups() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentsForGroups_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeploymentsForGroups("", "")) + foreach (BinaryData item in client.GetDeploymentsForGroups("", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } } @@ -2738,19 +2722,19 @@ public void Example_GetDeploymentsForGroups_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentsForGroups_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeploymentsForGroupsAsync("")) + await foreach (BinaryData item in client.GetDeploymentsForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } } @@ -2758,32 +2742,32 @@ public async Task Example_GetDeploymentsForGroups_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentsForGroups_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeploymentsForGroupsAsync("", "")) + await foreach (BinaryData item in client.GetDeploymentsForGroupsAsync("", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } } @@ -2791,16 +2775,16 @@ public async Task Example_GetDeploymentsForGroups_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroupsForGroups() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeviceClassSubgroupsForGroups("")) + foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroups("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -2808,18 +2792,18 @@ public void Example_GetDeviceClassSubgroupsForGroups() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceClassSubgroupsForGroups_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeviceClassSubgroupsForGroups("", "")) + foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroups("", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); } } @@ -2827,16 +2811,16 @@ public void Example_GetDeviceClassSubgroupsForGroups_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroupsForGroups_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeviceClassSubgroupsForGroupsAsync("")) + await foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroupsAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -2844,18 +2828,18 @@ public async Task Example_GetDeviceClassSubgroupsForGroups_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceClassSubgroupsForGroups_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeviceClassSubgroupsForGroupsAsync("", "")) + await foreach (BinaryData item in client.GetDeviceClassSubgroupsForGroupsAsync("", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceClassId").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("deviceCount").ToString()); - Console.WriteLine(result.GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassId").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("deviceCount").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); } } @@ -2863,19 +2847,19 @@ public async Task Example_GetDeviceClassSubgroupsForGroups_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentsForDeviceClassSubgroups() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeploymentsForDeviceClassSubgroups("", "")) + foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroups("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } } @@ -2883,32 +2867,32 @@ public void Example_GetDeploymentsForDeviceClassSubgroups() [Ignore("Only validating compilation of examples")] public void Example_GetDeploymentsForDeviceClassSubgroups_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeploymentsForDeviceClassSubgroups("", "", "")) + foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroups("", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } } @@ -2916,19 +2900,19 @@ public void Example_GetDeploymentsForDeviceClassSubgroups_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentsForDeviceClassSubgroups_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "")) + await foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); } } @@ -2936,32 +2920,32 @@ public async Task Example_GetDeploymentsForDeviceClassSubgroups_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDeploymentsForDeviceClassSubgroups_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "", "")) + await foreach (BinaryData item in client.GetDeploymentsForDeviceClassSubgroupsAsync("", "", orderBy: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deploymentId").ToString()); - Console.WriteLine(result.GetProperty("startDateTime").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("groupId").ToString()); - Console.WriteLine(result.GetProperty("deviceClassSubgroups")[0].ToString()); - Console.WriteLine(result.GetProperty("isCanceled").ToString()); - Console.WriteLine(result.GetProperty("isRetried").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); - Console.WriteLine(result.GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); - Console.WriteLine(result.GetProperty("isCloudInitiatedRollback").ToString()); + Console.WriteLine(result[0].GetProperty("deploymentId").ToString()); + Console.WriteLine(result[0].GetProperty("startDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("groupId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceClassSubgroups")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isCanceled").ToString()); + Console.WriteLine(result[0].GetProperty("isRetried").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedPercentage").ToString()); + Console.WriteLine(result[0].GetProperty("rollbackPolicy").GetProperty("failure").GetProperty("devicesFailedCount").ToString()); + Console.WriteLine(result[0].GetProperty("isCloudInitiatedRollback").ToString()); } } @@ -2969,17 +2953,17 @@ public async Task Example_GetDeploymentsForDeviceClassSubgroups_AllParameters_As [Ignore("Only validating compilation of examples")] public void Example_GetDeviceStatesForDeviceClassSubgroupDeployments() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "")) + foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } } @@ -2987,18 +2971,18 @@ public void Example_GetDeviceStatesForDeviceClassSubgroupDeployments() [Ignore("Only validating compilation of examples")] public void Example_GetDeviceStatesForDeviceClassSubgroupDeployments_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "", "")) + foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeployments("", "", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } } @@ -3006,17 +2990,17 @@ public void Example_GetDeviceStatesForDeviceClassSubgroupDeployments_AllParamete [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceStatesForDeviceClassSubgroupDeployments_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "")) + await foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } } @@ -3024,18 +3008,18 @@ public async Task Example_GetDeviceStatesForDeviceClassSubgroupDeployments_Async [Ignore("Only validating compilation of examples")] public async Task Example_GetDeviceStatesForDeviceClassSubgroupDeployments_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "", "")) + await foreach (BinaryData item in client.GetDeviceStatesForDeviceClassSubgroupDeploymentsAsync("", "", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("retryCount").ToString()); - Console.WriteLine(result.GetProperty("movedOnToNewDeployment").ToString()); - Console.WriteLine(result.GetProperty("deviceState").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("retryCount").ToString()); + Console.WriteLine(result[0].GetProperty("movedOnToNewDeployment").ToString()); + Console.WriteLine(result[0].GetProperty("deviceState").ToString()); } } @@ -3043,17 +3027,17 @@ public async Task Example_GetDeviceStatesForDeviceClassSubgroupDeployments_AllPa [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatuses() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetOperationStatuses()) + foreach (BinaryData item in client.GetOperationStatuses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -3061,26 +3045,26 @@ public void Example_GetOperationStatuses() [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatuses_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetOperationStatuses("", 1234)) + foreach (BinaryData item in client.GetOperationStatuses(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } } @@ -3088,17 +3072,17 @@ public void Example_GetOperationStatuses_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatuses_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetOperationStatusesAsync()) + await foreach (BinaryData item in client.GetOperationStatusesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -3106,26 +3090,26 @@ public async Task Example_GetOperationStatuses_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatuses_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetOperationStatusesAsync("", 1234)) + await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } } @@ -3133,14 +3117,14 @@ public async Task Example_GetOperationStatuses_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetLogCollections() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetLogCollections()) + foreach (BinaryData item in client.GetLogCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); } } @@ -3148,20 +3132,20 @@ public void Example_GetLogCollections() [Ignore("Only validating compilation of examples")] public void Example_GetLogCollections_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetLogCollections()) + foreach (BinaryData item in client.GetLogCollections()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } } @@ -3169,14 +3153,14 @@ public void Example_GetLogCollections_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLogCollections_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetLogCollectionsAsync()) + await foreach (BinaryData item in client.GetLogCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); } } @@ -3184,20 +3168,20 @@ public async Task Example_GetLogCollections_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLogCollections_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetLogCollectionsAsync()) + await foreach (BinaryData item in client.GetLogCollectionsAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("deviceList")[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); } } @@ -3205,16 +3189,16 @@ public async Task Example_GetLogCollections_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetHealthOfDevices() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetHealthOfDevices("")) + foreach (BinaryData item in client.GetHealthOfDevices("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); } } @@ -3222,19 +3206,19 @@ public void Example_GetHealthOfDevices() [Ignore("Only validating compilation of examples")] public void Example_GetHealthOfDevices_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - foreach (var item in client.GetHealthOfDevices("")) + foreach (BinaryData item in client.GetHealthOfDevices("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("digitalTwinModelId").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("result").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("digitalTwinModelId").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("result").ToString()); } } @@ -3242,16 +3226,16 @@ public void Example_GetHealthOfDevices_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetHealthOfDevices_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetHealthOfDevicesAsync("")) + await foreach (BinaryData item in client.GetHealthOfDevicesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].ToString()); } } @@ -3259,19 +3243,19 @@ public async Task Example_GetHealthOfDevices_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetHealthOfDevices_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - await foreach (var item in client.GetHealthOfDevicesAsync("")) + await foreach (BinaryData item in client.GetHealthOfDevicesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("deviceId").ToString()); - Console.WriteLine(result.GetProperty("moduleId").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("digitalTwinModelId").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("healthChecks")[0].GetProperty("result").ToString()); + Console.WriteLine(result[0].GetProperty("deviceId").ToString()); + Console.WriteLine(result[0].GetProperty("moduleId").ToString()); + Console.WriteLine(result[0].GetProperty("state").ToString()); + Console.WriteLine(result[0].GetProperty("digitalTwinModelId").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("healthChecks")[0].GetProperty("result").ToString()); } } @@ -3279,60 +3263,48 @@ public async Task Example_GetHealthOfDevices_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_ImportDevices() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); - - var data = "Devices"; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var operation = client.ImportDevices(WaitUntil.Completed, RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create("Devices"); + Operation operation = client.ImportDevices(WaitUntil.Completed, content); } [Test] [Ignore("Only validating compilation of examples")] public void Example_ImportDevices_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); - - var data = "Devices"; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - var operation = client.ImportDevices(WaitUntil.Completed, RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create("Devices"); + Operation operation = client.ImportDevices(WaitUntil.Completed, content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_ImportDevices_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); - - var data = "Devices"; - - var operation = await client.ImportDevicesAsync(WaitUntil.Completed, RequestContent.Create(data)); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create("Devices"); + Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_ImportDevices_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceManagementClient(endpoint, "", credential); - - var data = "Devices"; - - var operation = await client.ImportDevicesAsync(WaitUntil.Completed, RequestContent.Create(data)); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceManagementClient client = new DeviceManagementClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create("Devices"); + Operation operation = await client.ImportDevicesAsync(WaitUntil.Completed, content); } } } diff --git a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceUpdateClient.cs b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceUpdateClient.cs index c82023008514..7e4bb682ed36 100644 --- a/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceUpdateClient.cs +++ b/sdk/deviceupdate/Azure.IoT.DeviceUpdate/tests/Generated/Samples/Samples_DeviceUpdateClient.cs @@ -7,12 +7,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.IoT.DeviceUpdate; using NUnit.Framework; namespace Azure.IoT.DeviceUpdate.Samples @@ -23,9 +23,9 @@ public class Samples_DeviceUpdateClient [Ignore("Only validating compilation of examples")] public void Example_GetUpdate() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = client.GetUpdate("", "", ""); @@ -33,7 +33,7 @@ public void Example_GetUpdate() Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("manifestVersion").ToString()); Console.WriteLine(result.GetProperty("importedDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -43,11 +43,11 @@ public void Example_GetUpdate() [Ignore("Only validating compilation of examples")] public void Example_GetUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Response response = client.GetUpdate("", "", "", null); + Response response = client.GetUpdate("", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); @@ -58,7 +58,7 @@ public void Example_GetUpdate_AllParameters() Console.WriteLine(result.GetProperty("isDeployable").ToString()); Console.WriteLine(result.GetProperty("updateType").ToString()); Console.WriteLine(result.GetProperty("installedCriteria").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); @@ -81,9 +81,9 @@ public void Example_GetUpdate_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdate_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = await client.GetUpdateAsync("", "", ""); @@ -91,7 +91,7 @@ public async Task Example_GetUpdate_Async() Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("manifestVersion").ToString()); Console.WriteLine(result.GetProperty("importedDateTime").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -101,11 +101,11 @@ public async Task Example_GetUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Response response = await client.GetUpdateAsync("", "", "", null); + Response response = await client.GetUpdateAsync("", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); @@ -116,7 +116,7 @@ public async Task Example_GetUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("isDeployable").ToString()); Console.WriteLine(result.GetProperty("updateType").ToString()); Console.WriteLine(result.GetProperty("installedCriteria").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); @@ -139,9 +139,9 @@ public async Task Example_GetUpdate_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetFile() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = client.GetFile("", "", "", ""); @@ -149,46 +149,46 @@ public void Example_GetFile() Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); - Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetFile_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Response response = client.GetFile("", "", "", "", null); + Response response = client.GetFile("", "", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("sizeInBytes").ToString()); - Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanDetails").ToString()); - Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("downloadHandler").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); - Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("scanDetails").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetFile_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = await client.GetFileAsync("", "", "", ""); @@ -196,46 +196,46 @@ public async Task Example_GetFile_Async() Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); - Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetFile_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Response response = await client.GetFileAsync("", "", "", "", null); + Response response = await client.GetFileAsync("", "", "", "", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("fileId").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("sizeInBytes").ToString()); - Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("scanDetails").ToString()); - Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("relatedFiles")[0].GetProperty("properties").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("downloadHandler").GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("etag").ToString()); Console.WriteLine(result.GetProperty("fileName").ToString()); Console.WriteLine(result.GetProperty("sizeInBytes").ToString()); - Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hashes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("mimeType").ToString()); Console.WriteLine(result.GetProperty("scanResult").ToString()); Console.WriteLine(result.GetProperty("scanDetails").ToString()); - Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatus() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = client.GetOperationStatus(""); @@ -250,11 +250,11 @@ public void Example_GetOperationStatus() [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatus_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Response response = client.GetOperationStatus("", null); + Response response = client.GetOperationStatus("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -282,9 +282,9 @@ public void Example_GetOperationStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatus_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); Response response = await client.GetOperationStatusAsync(""); @@ -299,11 +299,11 @@ public async Task Example_GetOperationStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatus_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Response response = await client.GetOperationStatusAsync("", null); + Response response = await client.GetOperationStatusAsync("", ifNoneMatch: new ETag("")); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("operationId").ToString()); @@ -331,20 +331,20 @@ public async Task Example_GetOperationStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetUpdates() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetUpdates()) + foreach (BinaryData item in client.GetUpdates()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -352,38 +352,38 @@ public void Example_GetUpdates() [Ignore("Only validating compilation of examples")] public void Example_GetUpdates_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetUpdates("", "")) + foreach (BinaryData item in client.GetUpdates(search: "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("isDeployable").ToString()); - Console.WriteLine(result.GetProperty("updateType").ToString()); - Console.WriteLine(result.GetProperty("installedCriteria").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("scanResult").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("isDeployable").ToString()); + Console.WriteLine(result[0].GetProperty("updateType").ToString()); + Console.WriteLine(result[0].GetProperty("installedCriteria").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("scanResult").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } } @@ -391,20 +391,20 @@ public void Example_GetUpdates_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdates_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetUpdatesAsync()) + await foreach (BinaryData item in client.GetUpdatesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -412,38 +412,38 @@ public async Task Example_GetUpdates_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetUpdates_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetUpdatesAsync("", "")) + await foreach (BinaryData item in client.GetUpdatesAsync(search: "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("isDeployable").ToString()); - Console.WriteLine(result.GetProperty("updateType").ToString()); - Console.WriteLine(result.GetProperty("installedCriteria").ToString()); - Console.WriteLine(result.GetProperty("compatibility")[0].GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("referencedBy")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("scanResult").ToString()); - Console.WriteLine(result.GetProperty("manifestVersion").ToString()); - Console.WriteLine(result.GetProperty("importedDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("isDeployable").ToString()); + Console.WriteLine(result[0].GetProperty("updateType").ToString()); + Console.WriteLine(result[0].GetProperty("installedCriteria").ToString()); + Console.WriteLine(result[0].GetProperty("compatibility")[0].GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handler").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("handlerProperties").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("files")[0].ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("instructions").GetProperty("steps")[0].GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("referencedBy")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("scanResult").ToString()); + Console.WriteLine(result[0].GetProperty("manifestVersion").ToString()); + Console.WriteLine(result[0].GetProperty("importedDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } } @@ -451,14 +451,14 @@ public async Task Example_GetUpdates_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetProviders() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetProviders()) + foreach (BinaryData item in client.GetProviders()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -466,14 +466,14 @@ public void Example_GetProviders() [Ignore("Only validating compilation of examples")] public void Example_GetProviders_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetProviders()) + foreach (BinaryData item in client.GetProviders()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -481,14 +481,14 @@ public void Example_GetProviders_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetProviders_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetProvidersAsync()) + await foreach (BinaryData item in client.GetProvidersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -496,14 +496,14 @@ public async Task Example_GetProviders_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetProviders_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetProvidersAsync()) + await foreach (BinaryData item in client.GetProvidersAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -511,14 +511,14 @@ public async Task Example_GetProviders_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetNames() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetNames("")) + foreach (BinaryData item in client.GetNames("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -526,14 +526,14 @@ public void Example_GetNames() [Ignore("Only validating compilation of examples")] public void Example_GetNames_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetNames("")) + foreach (BinaryData item in client.GetNames("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -541,14 +541,14 @@ public void Example_GetNames_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetNames_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetNamesAsync("")) + await foreach (BinaryData item in client.GetNamesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -556,14 +556,14 @@ public async Task Example_GetNames_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetNames_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetNamesAsync("")) + await foreach (BinaryData item in client.GetNamesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -571,14 +571,14 @@ public async Task Example_GetNames_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetVersions() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetVersions("", "")) + foreach (BinaryData item in client.GetVersions("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -586,14 +586,14 @@ public void Example_GetVersions() [Ignore("Only validating compilation of examples")] public void Example_GetVersions_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetVersions("", "", "")) + foreach (BinaryData item in client.GetVersions("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -601,14 +601,14 @@ public void Example_GetVersions_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetVersions_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetVersionsAsync("", "")) + await foreach (BinaryData item in client.GetVersionsAsync("", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -616,14 +616,14 @@ public async Task Example_GetVersions_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetVersions_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetVersionsAsync("", "", "")) + await foreach (BinaryData item in client.GetVersionsAsync("", "", filter: "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -631,14 +631,14 @@ public async Task Example_GetVersions_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetFiles() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetFiles("", "", "")) + foreach (BinaryData item in client.GetFiles("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -646,14 +646,14 @@ public void Example_GetFiles() [Ignore("Only validating compilation of examples")] public void Example_GetFiles_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetFiles("", "", "")) + foreach (BinaryData item in client.GetFiles("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -661,14 +661,14 @@ public void Example_GetFiles_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetFiles_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetFilesAsync("", "", "")) + await foreach (BinaryData item in client.GetFilesAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -676,14 +676,14 @@ public async Task Example_GetFiles_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetFiles_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetFilesAsync("", "", "")) + await foreach (BinaryData item in client.GetFilesAsync("", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -691,17 +691,17 @@ public async Task Example_GetFiles_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatuses() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetOperationStatuses()) + foreach (BinaryData item in client.GetOperationStatuses()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -709,32 +709,32 @@ public void Example_GetOperationStatuses() [Ignore("Only validating compilation of examples")] public void Example_GetOperationStatuses_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - foreach (var item in client.GetOperationStatuses("", 1234)) + foreach (BinaryData item in client.GetOperationStatuses(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("resourceLocation").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } } @@ -742,17 +742,17 @@ public void Example_GetOperationStatuses_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatuses_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetOperationStatusesAsync()) + await foreach (BinaryData item in client.GetOperationStatusesAsync()) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); } } @@ -760,32 +760,32 @@ public async Task Example_GetOperationStatuses_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetOperationStatuses_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - await foreach (var item in client.GetOperationStatusesAsync("", 1234)) + await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "", top: 1234)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("operationId").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("update").GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("resourceLocation").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("occurredDateTime").ToString()); - Console.WriteLine(result.GetProperty("traceId").ToString()); - Console.WriteLine(result.GetProperty("lastActionDateTime").ToString()); - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("etag").ToString()); + Console.WriteLine(result[0].GetProperty("operationId").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("provider").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("updateId").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("update").GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("resourceLocation").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("innererror").GetProperty("errorDetail").ToString()); + Console.WriteLine(result[0].GetProperty("error").GetProperty("occurredDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("traceId").ToString()); + Console.WriteLine(result[0].GetProperty("lastActionDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("etag").ToString()); } } @@ -793,166 +793,166 @@ public async Task Example_GetOperationStatuses_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteUpdate() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - var operation = client.DeleteUpdate(WaitUntil.Completed, "", "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteUpdate(WaitUntil.Completed, "", "", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_DeleteUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); - - var operation = client.DeleteUpdate(WaitUntil.Completed, "", "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = client.DeleteUpdate(WaitUntil.Completed, "", "", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteUpdate_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); - - var operation = await client.DeleteUpdateAsync(WaitUntil.Completed, "", "", ""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteUpdateAsync(WaitUntil.Completed, "", "", ""); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_DeleteUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - var operation = await client.DeleteUpdateAsync(WaitUntil.Completed, "", "", ""); - - Console.WriteLine(operation.GetRawResponse().Status); + Operation operation = await client.DeleteUpdateAsync(WaitUntil.Completed, "", "", ""); } [Test] [Ignore("Only validating compilation of examples")] public void Example_StartImportUpdate() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); - - var data = new[] { - new { - importManifest = new { - url = "", - sizeInBytes = 1234L, - hashes = new { - key = "", - }, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - var operation = client.StartImportUpdate(WaitUntil.Completed, RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +} +}); + Operation operation = client.StartImportUpdate(WaitUntil.Completed, content); } [Test] [Ignore("Only validating compilation of examples")] public void Example_StartImportUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); - - var data = new[] { - new { - importManifest = new { - url = "", - sizeInBytes = 1234L, - hashes = new { - key = "", - }, - }, - friendlyName = "", - files = new[] { - new { - filename = "", - url = "", - } - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - var operation = client.StartImportUpdate(WaitUntil.Completed, RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +["friendlyName"] = "", +["files"] = new List() +{ +new Dictionary() +{ +["filename"] = "", +["url"] = "", +} +}, +} +}); + Operation operation = client.StartImportUpdate(WaitUntil.Completed, content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_StartImportUpdate_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); - - var data = new[] { - new { - importManifest = new { - url = "", - sizeInBytes = 1234L, - hashes = new { - key = "", - }, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - var operation = await client.StartImportUpdateAsync(WaitUntil.Completed, RequestContent.Create(data)); - - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +} +}); + Operation operation = await client.StartImportUpdateAsync(WaitUntil.Completed, content); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_StartImportUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new DeviceUpdateClient(endpoint, "", credential); - - var data = new[] { - new { - importManifest = new { - url = "", - sizeInBytes = 1234L, - hashes = new { - key = "", - }, - }, - friendlyName = "", - files = new[] { - new { - filename = "", - url = "", - } - }, - } -}; - - var operation = await client.StartImportUpdateAsync(WaitUntil.Completed, RequestContent.Create(data)); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "", credential); - Console.WriteLine(operation.GetRawResponse().Status); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["importManifest"] = new Dictionary() +{ +["url"] = "", +["sizeInBytes"] = 1234L, +["hashes"] = new Dictionary() +{ +["key"] = "", +}, +}, +["friendlyName"] = "", +["files"] = new List() +{ +new Dictionary() +{ +["filename"] = "", +["url"] = "", +} +}, +} +}); + Operation operation = await client.StartImportUpdateAsync(WaitUntil.Completed, content); } } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs index 8b7058d6e372..8f635ae7f5ad 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/ArmHardwareSecurityModulesModelFactory.cs @@ -104,7 +104,7 @@ public static DedicatedHsmData DedicatedHsmData(ResourceIdentifier id = null, st /// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... /// Private Ip address of the interface. /// A new instance for mocking. - public static NetworkInterface NetworkInterface(ResourceIdentifier id = null, string privateIPAddress = null) + public static NetworkInterface NetworkInterface(string id = null, string privateIPAddress = null) { return new NetworkInterface(id, privateIPAddress); } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterCollection.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterCollection.cs index aba89cb75239..ef895e9722e9 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterCollection.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -229,7 +230,7 @@ public virtual AsyncPageable GetAllAsync(string skiptok { HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudHsmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skiptoken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudHsmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skiptoken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), _cloudHsmClusterClientDiagnostics, Pipeline, "CloudHsmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), _cloudHsmClusterClientDiagnostics, Pipeline, "CloudHsmClusterCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -252,7 +253,7 @@ public virtual Pageable GetAll(string skiptoken = null, { HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudHsmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skiptoken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudHsmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skiptoken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), _cloudHsmClusterClientDiagnostics, Pipeline, "CloudHsmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), _cloudHsmClusterClientDiagnostics, Pipeline, "CloudHsmClusterCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterData.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterData.cs index db1e49baa2be..7376eaf6b51d 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterData.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterData.cs @@ -22,7 +22,7 @@ public partial class CloudHsmClusterData : TrackedResourceData /// The location. public CloudHsmClusterData(AzureLocation location) : base(location) { - HsmProperties = new ChangeTrackingList(); + Hsms = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); } @@ -45,7 +45,7 @@ internal CloudHsmClusterData(ResourceIdentifier id, string name, ResourceType re ProvisioningState = provisioningState; AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; SecurityDomain = securityDomain; - HsmProperties = hsms; + Hsms = hsms; PublicNetworkAccess = publicNetworkAccess; PrivateEndpointConnections = privateEndpointConnections; Sku = sku; @@ -58,7 +58,7 @@ internal CloudHsmClusterData(ResourceIdentifier id, string name, ResourceType re /// Security domain properties information for Cloud HSM cluster. public CloudHsmClusterSecurityDomainProperties SecurityDomain { get; set; } /// An array of Cloud HSM Cluster's HSMs. - public IList HsmProperties { get; } + public IList Hsms { get; } /// The Cloud HSM Cluster public network access. public string PublicNetworkAccess { get; set; } /// List of private endpoint connection resources. diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.cs index 1455c0c69f69..b73a7bb912f8 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.cs @@ -10,6 +10,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -372,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, public virtual AsyncPageable GetCloudHsmClusterPrivateLinkResourcesAsync(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudHsmClusterPrivateLinkResourcesRestClient.CreateListByCloudHsmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, HardwareSecurityModulesPrivateLinkResource.DeserializeHardwareSecurityModulesPrivateLinkResource, _cloudHsmClusterPrivateLinkResourcesClientDiagnostics, Pipeline, "CloudHsmClusterResource.GetCloudHsmClusterPrivateLinkResources", "value", null, cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, HardwareSecurityModulesPrivateLinkResource.DeserializeHardwareSecurityModulesPrivateLinkResource, _cloudHsmClusterPrivateLinkResourcesClientDiagnostics, Pipeline, "CloudHsmClusterResource.GetCloudHsmClusterPrivateLinkResources", "value", null, cancellationToken); } /// @@ -393,7 +394,7 @@ public virtual AsyncPageable GetClou public virtual Pageable GetCloudHsmClusterPrivateLinkResources(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudHsmClusterPrivateLinkResourcesRestClient.CreateListByCloudHsmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, HardwareSecurityModulesPrivateLinkResource.DeserializeHardwareSecurityModulesPrivateLinkResource, _cloudHsmClusterPrivateLinkResourcesClientDiagnostics, Pipeline, "CloudHsmClusterResource.GetCloudHsmClusterPrivateLinkResources", "value", null, cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, HardwareSecurityModulesPrivateLinkResource.DeserializeHardwareSecurityModulesPrivateLinkResource, _cloudHsmClusterPrivateLinkResourcesClientDiagnostics, Pipeline, "CloudHsmClusterResource.GetCloudHsmClusterPrivateLinkResources", "value", null, cancellationToken); } /// diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmCollection.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmCollection.cs index fa9b179d017d..7442dfba44da 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmCollection.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -229,7 +230,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, { HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedHsmRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, top); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dedicatedHsmRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, top); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -252,7 +253,7 @@ public virtual Pageable GetAll(int? top = null, Cancellati { HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedHsmRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, top); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dedicatedHsmRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, top); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.cs index 50245691fdf4..098e6d774148 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.cs @@ -10,6 +10,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -316,7 +317,7 @@ public virtual AsyncPageable GetOutboundNetworkDepe { HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedHsmRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dedicatedHsmRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint, _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint, _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); } /// @@ -338,7 +339,7 @@ public virtual Pageable GetOutboundNetworkDependenc { HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedHsmRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dedicatedHsmRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint, _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, OutboundEnvironmentEndpoint.DeserializeOutboundEnvironmentEndpoint, _dedicatedHsmClientDiagnostics, Pipeline, "DedicatedHsmResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 1bfc12e995f8..616ea4d5fbc2 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -6,6 +6,7 @@ #nullable disable using System.Threading; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -64,7 +65,7 @@ public virtual AsyncPageable GetCloudHsmClustersAsync(s { HttpMessage FirstPageRequest(int? pageSizeHint) => CloudHsmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skiptoken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CloudHsmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skiptoken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), CloudHsmClusterClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetCloudHsmClusters", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), CloudHsmClusterClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetCloudHsmClusters", "value", "nextLink", cancellationToken); } /// @@ -87,7 +88,7 @@ public virtual Pageable GetCloudHsmClusters(string skip { HttpMessage FirstPageRequest(int? pageSizeHint) => CloudHsmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skiptoken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CloudHsmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skiptoken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), CloudHsmClusterClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetCloudHsmClusters", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudHsmClusterResource(Client, CloudHsmClusterData.DeserializeCloudHsmClusterData(e)), CloudHsmClusterClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetCloudHsmClusters", "value", "nextLink", cancellationToken); } /// @@ -110,7 +111,7 @@ public virtual AsyncPageable GetDedicatedHsmsAsync(int? to { HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedHsmRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DedicatedHsmRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), DedicatedHsmClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDedicatedHsms", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), DedicatedHsmClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDedicatedHsms", "value", "nextLink", cancellationToken); } /// @@ -133,7 +134,7 @@ public virtual Pageable GetDedicatedHsms(int? top = null, { HttpMessage FirstPageRequest(int? pageSizeHint) => DedicatedHsmRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, top); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DedicatedHsmRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, top); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), DedicatedHsmClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDedicatedHsms", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DedicatedHsmResource(Client, DedicatedHsmData.DeserializeDedicatedHsmData(e)), DedicatedHsmClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDedicatedHsms", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/HardwareSecurityModulesPrivateEndpointConnectionCollection.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/HardwareSecurityModulesPrivateEndpointConnectionCollection.cs index 78ccc5f837cd..f76015076ddc 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/HardwareSecurityModulesPrivateEndpointConnectionCollection.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/HardwareSecurityModulesPrivateEndpointConnectionCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -232,7 +233,7 @@ public virtual AsyncPageable _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByCloudHsmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByCloudHsmClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HardwareSecurityModulesPrivateEndpointConnectionResource(Client, HardwareSecurityModulesPrivateEndpointConnectionData.DeserializeHardwareSecurityModulesPrivateEndpointConnectionData(e)), _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "HardwareSecurityModulesPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HardwareSecurityModulesPrivateEndpointConnectionResource(Client, HardwareSecurityModulesPrivateEndpointConnectionData.DeserializeHardwareSecurityModulesPrivateEndpointConnectionData(e)), _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "HardwareSecurityModulesPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -254,7 +255,7 @@ public virtual Pageable _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByCloudHsmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByCloudHsmClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HardwareSecurityModulesPrivateEndpointConnectionResource(Client, HardwareSecurityModulesPrivateEndpointConnectionData.DeserializeHardwareSecurityModulesPrivateEndpointConnectionData(e)), _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "HardwareSecurityModulesPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HardwareSecurityModulesPrivateEndpointConnectionResource(Client, HardwareSecurityModulesPrivateEndpointConnectionData.DeserializeHardwareSecurityModulesPrivateEndpointConnectionData(e)), _hardwareSecurityModulesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "HardwareSecurityModulesPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterData.Serialization.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterData.Serialization.cs index 3c5419933e2d..0a6f30487337 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterData.Serialization.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/CloudHsmClusterData.Serialization.cs @@ -53,11 +53,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("securityDomain"u8); writer.WriteObjectValue(SecurityDomain); } - if (Optional.IsCollectionDefined(HsmProperties)) + if (Optional.IsCollectionDefined(Hsms)) { writer.WritePropertyName("hsms"u8); writer.WriteStartArray(); - foreach (var item in HsmProperties) + foreach (var item in Hsms) { writer.WriteObjectValue(item); } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.Serialization.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.Serialization.cs index 5c066cb1d5d7..24722fdb63a9 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.Serialization.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.Serialization.cs @@ -29,17 +29,13 @@ internal static NetworkInterface DeserializeNetworkInterface(JsonElement element { return null; } - Optional id = default; + Optional id = default; Optional privateIPAddress = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) { - if(property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = new ResourceIdentifier(property.Value.GetString()); + id = property.Value.GetString(); continue; } if (property.NameEquals("privateIpAddress"u8)) diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.cs index de1fdd959569..d8410d7f88a8 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/NetworkInterface.cs @@ -5,8 +5,6 @@ #nullable disable -using Azure.Core; - namespace Azure.ResourceManager.HardwareSecurityModules.Models { /// The network interface definition. @@ -20,14 +18,14 @@ public NetworkInterface() /// Initializes a new instance of NetworkInterface. /// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... /// Private Ip address of the interface. - internal NetworkInterface(ResourceIdentifier id, string privateIPAddress) + internal NetworkInterface(string id, string privateIPAddress) { Id = id; PrivateIPAddress = privateIPAddress; } /// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - public ResourceIdentifier Id { get; } + public string Id { get; } /// Private Ip address of the interface. public string PrivateIPAddress { get; set; } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointGroup.Serialization.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointCollection.Serialization.cs similarity index 82% rename from sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointGroup.Serialization.cs rename to sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointCollection.Serialization.cs index 55cee527cadf..490828bafefa 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointGroup.Serialization.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointCollection.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.HardwareSecurityModules.Models { - internal partial class OutboundEnvironmentEndpointGroup + internal partial class OutboundEnvironmentEndpointCollection { - internal static OutboundEnvironmentEndpointGroup DeserializeOutboundEnvironmentEndpointGroup(JsonElement element) + internal static OutboundEnvironmentEndpointCollection DeserializeOutboundEnvironmentEndpointCollection(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -39,7 +39,7 @@ internal static OutboundEnvironmentEndpointGroup DeserializeOutboundEnvironmentE continue; } } - return new OutboundEnvironmentEndpointGroup(value, nextLink.Value); + return new OutboundEnvironmentEndpointCollection(value, nextLink.Value); } } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointGroup.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointCollection.cs similarity index 77% rename from sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointGroup.cs rename to sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointCollection.cs index 644c7bdda876..898cc501153c 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointGroup.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/Models/OutboundEnvironmentEndpointCollection.cs @@ -13,22 +13,22 @@ namespace Azure.ResourceManager.HardwareSecurityModules.Models { /// Collection of OutboundEnvironmentEndpoint. - internal partial class OutboundEnvironmentEndpointGroup + internal partial class OutboundEnvironmentEndpointCollection { - /// Initializes a new instance of OutboundEnvironmentEndpointGroup. + /// Initializes a new instance of OutboundEnvironmentEndpointCollection. /// Collection of resources. /// is null. - internal OutboundEnvironmentEndpointGroup(IEnumerable value) + internal OutboundEnvironmentEndpointCollection(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of OutboundEnvironmentEndpointGroup. + /// Initializes a new instance of OutboundEnvironmentEndpointCollection. /// Collection of resources. /// Link to next page of resources. - internal OutboundEnvironmentEndpointGroup(IReadOnlyList value, string nextLink) + internal OutboundEnvironmentEndpointCollection(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/RestOperations/DedicatedHsmRestOperations.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/RestOperations/DedicatedHsmRestOperations.cs index d51785f35444..c01dc57991b6 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/RestOperations/DedicatedHsmRestOperations.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/RestOperations/DedicatedHsmRestOperations.cs @@ -525,7 +525,7 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -537,9 +537,9 @@ public async Task> ListOutboundNetwor { case 200: { - OutboundEnvironmentEndpointGroup value = default; + OutboundEnvironmentEndpointCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OutboundEnvironmentEndpointGroup.DeserializeOutboundEnvironmentEndpointGroup(document.RootElement); + value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -554,7 +554,7 @@ public async Task> ListOutboundNetwor /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -566,9 +566,9 @@ public Response ListOutboundNetworkDependencie { case 200: { - OutboundEnvironmentEndpointGroup value = default; + OutboundEnvironmentEndpointCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OutboundEnvironmentEndpointGroup.DeserializeOutboundEnvironmentEndpointGroup(document.RootElement); + value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -742,7 +742,7 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsNextPageReque /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> ListOutboundNetworkDependenciesEndpointsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -755,9 +755,9 @@ public async Task> ListOutboundNetwor { case 200: { - OutboundEnvironmentEndpointGroup value = default; + OutboundEnvironmentEndpointCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OutboundEnvironmentEndpointGroup.DeserializeOutboundEnvironmentEndpointGroup(document.RootElement); + value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -773,7 +773,7 @@ public async Task> ListOutboundNetwor /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpointsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response ListOutboundNetworkDependenciesEndpointsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -786,9 +786,9 @@ public Response ListOutboundNetworkDependencie { case 200: { - OutboundEnvironmentEndpointGroup value = default; + OutboundEnvironmentEndpointCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OutboundEnvironmentEndpointGroup.DeserializeOutboundEnvironmentEndpointGroup(document.RootElement); + value = OutboundEnvironmentEndpointCollection.DeserializeOutboundEnvironmentEndpointCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 aea44f1a5d63..26843475e9e5 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 @@ -2,128 +2,156 @@ - -This sample shows how to call InferCancerProfileAsync with required parameters. + +This sample shows how to call InferCancerProfileAsync. "); -var endpoint = new Uri(""); -var client = new CancerProfilingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -var oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() { - new PatientRecord("") +new PatientRecord("") +}); +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); +OncoPhenotypeResult responseData = operation.Value; +]]> +This sample shows how to call InferCancerProfileAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +{ +new PatientRecord("") { - Info = new PatientInfo() +Info = new PatientInfo() { - Sex = PatientInfoSex.Female, - BirthDate = DateTimeOffset.UtcNow, - ClinicalInfo = +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = { - new ClinicalCodedElement("", "") +new ClinicalCodedElement("","") { - Name = "", - Value = "", - } - }, - }, - Data = +Name = "", +Value = "", +} +}, +}, +Data = { - new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.UtcNow, - } - }, - } +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} }) { Configuration = new OncoPhenotypeModelConfiguration() -{ + { Verbose = true, IncludeEvidence = true, - InferenceTypes = + InferenceTypes = { - OncoPhenotypeInferenceType.TumorSite - }, +OncoPhenotypeInferenceType.TumorSite +}, CheckForCancerCase = true, }, }; -var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); -]]> - +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); +OncoPhenotypeResult responseData = operation.Value; +]]> - -This sample shows how to call InferCancerProfile with required parameters. + +This sample shows how to call InferCancerProfile. "); -var endpoint = new Uri(""); -var client = new CancerProfilingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -var oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() { - new PatientRecord("") +new PatientRecord("") +}); +Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); +OncoPhenotypeResult responseData = operation.Value; +]]> +This sample shows how to call InferCancerProfile with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + +OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +{ +new PatientRecord("") { - Info = new PatientInfo() +Info = new PatientInfo() { - Sex = PatientInfoSex.Female, - BirthDate = DateTimeOffset.UtcNow, - ClinicalInfo = +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = { - new ClinicalCodedElement("", "") +new ClinicalCodedElement("","") { - Name = "", - Value = "", - } - }, - }, - Data = +Name = "", +Value = "", +} +}, +}, +Data = { - new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.UtcNow, - } - }, - } +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} }) { Configuration = new OncoPhenotypeModelConfiguration() -{ + { Verbose = true, IncludeEvidence = true, - InferenceTypes = + InferenceTypes = { - OncoPhenotypeInferenceType.TumorSite - }, +OncoPhenotypeInferenceType.TumorSite +}, CheckForCancerCase = true, }, }; -var operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); -]]> - +Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); +OncoPhenotypeResult responseData = operation.Value; +]]> - -This sample shows how to call InferCancerProfileAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call InferCancerProfileAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new CancerProfilingClient(endpoint, credential); - -var data = new { - patients = new[] { - new { - id = "", - } - }, -}; - -var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, +}); +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -131,56 +159,66 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdateDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call InferCancerProfileAsync with all parameters and request content, and how to parse the result. +This sample shows how to call InferCancerProfileAsync with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new CancerProfilingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -var data = new { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new { - verbose = true, - includeEvidence = true, - inferenceTypes = new[] { - "tumorSite" - }, - checkForCancerCase = true, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() + { + ["verbose"] = true, + ["includeEvidence"] = true, + ["inferenceTypes"] = new List() +{ +"tumorSite" +}, + ["checkForCancerCase"] = true, }, -}; - -var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, RequestContent.Create(data)); - +}); +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -207,28 +245,29 @@ Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetPr Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("importance").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("caseId").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("modelVersion").ToString()); -]]> - +]]> - -This sample shows how to call InferCancerProfile with required parameters and request content, and how to parse the result. + +This sample shows how to call InferCancerProfile and parse the result. "); -var endpoint = new Uri(""); -var client = new CancerProfilingClient(endpoint, credential); - -var data = new { - patients = new[] { - new { - id = "", - } - }, -}; - -var operation = client.InferCancerProfile(WaitUntil.Completed, RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, +}); +Operation operation = client.InferCancerProfile(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -236,56 +275,66 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdateDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call InferCancerProfile with all parameters and request content, and how to parse the result. +This sample shows how to call InferCancerProfile with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new CancerProfilingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -var data = new { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new { - verbose = true, - includeEvidence = true, - inferenceTypes = new[] { - "tumorSite" - }, - checkForCancerCase = true, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() + { + ["verbose"] = true, + ["includeEvidence"] = true, + ["inferenceTypes"] = new List() +{ +"tumorSite" +}, + ["checkForCancerCase"] = true, }, -}; - -var operation = client.InferCancerProfile(WaitUntil.Completed, RequestContent.Create(data)); - +}); +Operation operation = client.InferCancerProfile(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -312,8 +361,7 @@ Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetPr Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("evidence")[0].GetProperty("importance").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("inferences")[0].GetProperty("caseId").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("modelVersion").ToString()); -]]> - +]]> \ No newline at end of file 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 44a2402058eb..d054b68df887 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 @@ -7,11 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; +using Azure.Health.Insights.CancerProfiling; using Azure.Identity; using NUnit.Framework; @@ -23,22 +23,23 @@ public class Samples_CancerProfilingClient [Ignore("Only validating compilation of examples")] public void Example_InferCancerProfile() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new CancerProfilingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - patients = new[] { - new { - id = "", - } - }, - }; - - var operation = client.InferCancerProfile(WaitUntil.Completed, RequestContent.Create(data)); - + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, + }); + Operation operation = client.InferCancerProfile(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -51,56 +52,64 @@ public void Example_InferCancerProfile() [Ignore("Only validating compilation of examples")] public void Example_InferCancerProfile_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new CancerProfilingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() { - verbose = true, - includeEvidence = true, - inferenceTypes = new[] { - "tumorSite" - }, - checkForCancerCase = true, + ["verbose"] = true, + ["includeEvidence"] = true, + ["inferenceTypes"] = new List() +{ +"tumorSite" +}, + ["checkForCancerCase"] = true, }, - }; - - var operation = client.InferCancerProfile(WaitUntil.Completed, RequestContent.Create(data)); - + }); + Operation operation = client.InferCancerProfile(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -131,24 +140,93 @@ public void Example_InferCancerProfile_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_InferCancerProfile_Async() + public void Example_InferCancerProfile_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new CancerProfilingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - var data = new - { - patients = new[] { - new { - id = "", + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +{ +new PatientRecord("") +}); + Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); + OncoPhenotypeResult responseData = operation.Value; } - }, + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_InferCancerProfile_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() +{ +new PatientRecord("") +{ +Info = new PatientInfo() +{ +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = +{ +new ClinicalCodedElement("","") +{ +Name = "", +Value = "", +} +}, +}, +Data = +{ +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +{ +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} +}) + { + Configuration = new OncoPhenotypeModelConfiguration() + { + Verbose = true, + IncludeEvidence = true, + InferenceTypes = +{ +OncoPhenotypeInferenceType.TumorSite +}, + CheckForCancerCase = true, + }, }; + Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); + OncoPhenotypeResult responseData = operation.Value; + } - var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_InferCancerProfile_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + RequestContent content = RequestContent.Create(new Dictionary() + { + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, + }); + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -161,56 +239,64 @@ public async Task Example_InferCancerProfile_Async() [Ignore("Only validating compilation of examples")] public async Task Example_InferCancerProfile_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new CancerProfilingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() { - verbose = true, - includeEvidence = true, - inferenceTypes = new[] { - "tumorSite" - }, - checkForCancerCase = true, + ["verbose"] = true, + ["includeEvidence"] = true, + ["inferenceTypes"] = new List() +{ +"tumorSite" +}, + ["checkForCancerCase"] = true, }, - }; - - var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, RequestContent.Create(data)); - + }); + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -243,38 +329,54 @@ public async Task Example_InferCancerProfile_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_InferCancerProfile_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new CancerProfilingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - var oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] - { - new PatientRecord("") + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() { - Info = new PatientInfo() +new PatientRecord("") +}); + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); + OncoPhenotypeResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_InferCancerProfile_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); + + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new List() { - Sex = PatientInfoSex.Female, - BirthDate = DateTimeOffset.UtcNow, - ClinicalInfo = +new PatientRecord("") { - new ClinicalCodedElement("", "") +Info = new PatientInfo() { - Name = "", - Value = "", - } - }, - }, - Data = +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = { - new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) +new ClinicalCodedElement("","") { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.UtcNow, - } - }, - } - }) +Name = "", +Value = "", +} +}, +}, +Data = +{ +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +{ +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} +}) { Configuration = new OncoPhenotypeModelConfiguration() { @@ -282,12 +384,13 @@ public async Task Example_InferCancerProfile_Convenience_Async() IncludeEvidence = true, InferenceTypes = { - OncoPhenotypeInferenceType.TumorSite - }, +OncoPhenotypeInferenceType.TumorSite +}, CheckForCancerCase = true, }, }; - var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); + OncoPhenotypeResult responseData = operation.Value; } } } diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml index c2588a0df089..b31cef469138 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml @@ -2,332 +2,360 @@ - -This sample shows how to call MatchTrialsAsync with required parameters. + +This sample shows how to call MatchTrialsAsync. "); -var endpoint = new Uri(""); -var client = new ClinicalMatchingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -var trialMatcherData = new TrialMatcherData(new PatientRecord[] +TrialMatcherData trialMatcherData = new TrialMatcherData(new List() { - new PatientRecord("") +new PatientRecord("") +}); +Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); +TrialMatcherResult responseData = operation.Value; +]]> +This sample shows how to call MatchTrialsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + +TrialMatcherData trialMatcherData = new TrialMatcherData(new List() { - Info = new PatientInfo() +new PatientRecord("") { - Sex = PatientInfoSex.Female, - BirthDate = DateTimeOffset.UtcNow, - ClinicalInfo = +Info = new PatientInfo() { - new ClinicalCodedElement("", "") +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = { - Name = "", - Value = "", - } - }, - }, - Data = +new ClinicalCodedElement("","") { - new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) +Name = "", +Value = "", +} +}, +}, +Data = { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.UtcNow, - } - }, - } +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +{ +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} }) { Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials() + { + CustomTrials = { - CustomTrials = -{ - new ClinicalTrialDetails("", new ClinicalTrialMetadata(new string[] +new ClinicalTrialDetails("",new ClinicalTrialMetadata(new List() { - "" - }) +"" +}) { - Phases = +Phases = { - ClinicalTrialPhase.NotApplicable - }, - StudyType = ClinicalTrialStudyType.Interventional, - RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, - Sponsors = +ClinicalTrialPhase.NotApplicable +}, +StudyType = ClinicalTrialStudyType.Interventional, +RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, +Sponsors = { - "" - }, - Contacts = +"" +}, +Contacts = { - new ContactDetails() +new ContactDetails() { - Name = "", - Email = "", - Phone = "", - } - }, - Facilities = +Name = "", +Email = "", +Phone = "", +} +}, +Facilities = { - new ClinicalTrialResearchFacility("", "") +new ClinicalTrialResearchFacility("","") { - City = "", - State = "", - } - }, - }) +City = "", +State = "", +} +}, +}) { - EligibilityCriteriaText = "", - Demographics = new ClinicalTrialDemographics() +EligibilityCriteriaText = "", +Demographics = new ClinicalTrialDemographics() { - AcceptedSex = ClinicalTrialAcceptedSex.All, - AcceptedAgeRange = new AcceptedAgeRange() +AcceptedSex = ClinicalTrialAcceptedSex.All, +AcceptedAgeRange = new AcceptedAgeRange() { - MinimumAge = new AcceptedAge(AgeUnit.Years, 3.14f), - MaximumAge = new AcceptedAge(AgeUnit.Years, 3.14f), - }, - }, - } - }, - RegistryFilters = +MinimumAge = new AcceptedAge(AgeUnit.Years,123.45F), +MaximumAge = null, +}, +}, +} +}, + RegistryFilters = { - new ClinicalTrialRegistryFilter() +new ClinicalTrialRegistryFilter() { - Conditions = +Conditions = { - "" - }, - StudyTypes = +"" +}, +StudyTypes = { - ClinicalTrialStudyType.Interventional - }, - RecruitmentStatuses = +ClinicalTrialStudyType.Interventional +}, +RecruitmentStatuses = { - ClinicalTrialRecruitmentStatus.UnknownStatus - }, - Sponsors = +ClinicalTrialRecruitmentStatus.UnknownStatus +}, +Sponsors = { - "" - }, - Phases = +"" +}, +Phases = { - ClinicalTrialPhase.NotApplicable - }, - Purposes = +ClinicalTrialPhase.NotApplicable +}, +Purposes = { - ClinicalTrialPurpose.NotApplicable - }, - Ids = +ClinicalTrialPurpose.NotApplicable +}, +Ids = { - "" - }, - Sources = +"" +}, +Sources = { - ClinicalTrialSource.Custom - }, - FacilityNames = +ClinicalTrialSource.Custom +}, +FacilityNames = { - "" - }, - FacilityLocations = +"" +}, +FacilityLocations = { - new GeographicLocation("") +new GeographicLocation("") { - City = "", - State = "", - } - }, - FacilityAreas = +City = "", +State = "", +} +}, +FacilityAreas = { - new GeographicArea(GeoJsonType.Feature, new AreaGeometry(GeoJsonGeometryType.Point, new float[] +new GeographicArea(GeoJsonType.Feature,new AreaGeometry(GeoJsonGeometryType.Point,new List() { - 3.14f - }), new AreaProperties(GeoJsonPropertiesSubType.Circle, 3.14)) - }, - } - }, +123.45F +}),new AreaProperties(GeoJsonPropertiesSubType.Circle,123.45)) +}, +} +}, }) -{ + { Verbose = true, IncludeEvidence = true, }, }; -var operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); -]]> - +Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); +TrialMatcherResult responseData = operation.Value; +]]> - -This sample shows how to call MatchTrials with required parameters. + +This sample shows how to call MatchTrials. "); -var endpoint = new Uri(""); -var client = new ClinicalMatchingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -var trialMatcherData = new TrialMatcherData(new PatientRecord[] +TrialMatcherData trialMatcherData = new TrialMatcherData(new List() { - new PatientRecord("") +new PatientRecord("") +}); +Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); +TrialMatcherResult responseData = operation.Value; +]]> +This sample shows how to call MatchTrials with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + +TrialMatcherData trialMatcherData = new TrialMatcherData(new List() { - Info = new PatientInfo() +new PatientRecord("") { - Sex = PatientInfoSex.Female, - BirthDate = DateTimeOffset.UtcNow, - ClinicalInfo = +Info = new PatientInfo() { - new ClinicalCodedElement("", "") +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = { - Name = "", - Value = "", - } - }, - }, - Data = +new ClinicalCodedElement("","") { - new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) +Name = "", +Value = "", +} +}, +}, +Data = { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.UtcNow, - } - }, - } +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +{ +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} }) { Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials() + { + CustomTrials = { - CustomTrials = -{ - new ClinicalTrialDetails("", new ClinicalTrialMetadata(new string[] +new ClinicalTrialDetails("",new ClinicalTrialMetadata(new List() { - "" - }) +"" +}) { - Phases = +Phases = { - ClinicalTrialPhase.NotApplicable - }, - StudyType = ClinicalTrialStudyType.Interventional, - RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, - Sponsors = +ClinicalTrialPhase.NotApplicable +}, +StudyType = ClinicalTrialStudyType.Interventional, +RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, +Sponsors = { - "" - }, - Contacts = +"" +}, +Contacts = { - new ContactDetails() +new ContactDetails() { - Name = "", - Email = "", - Phone = "", - } - }, - Facilities = +Name = "", +Email = "", +Phone = "", +} +}, +Facilities = { - new ClinicalTrialResearchFacility("", "") +new ClinicalTrialResearchFacility("","") { - City = "", - State = "", - } - }, - }) +City = "", +State = "", +} +}, +}) { - EligibilityCriteriaText = "", - Demographics = new ClinicalTrialDemographics() +EligibilityCriteriaText = "", +Demographics = new ClinicalTrialDemographics() { - AcceptedSex = ClinicalTrialAcceptedSex.All, - AcceptedAgeRange = new AcceptedAgeRange() +AcceptedSex = ClinicalTrialAcceptedSex.All, +AcceptedAgeRange = new AcceptedAgeRange() { - MinimumAge = new AcceptedAge(AgeUnit.Years, 3.14f), - MaximumAge = new AcceptedAge(AgeUnit.Years, 3.14f), - }, - }, - } - }, - RegistryFilters = +MinimumAge = new AcceptedAge(AgeUnit.Years,123.45F), +MaximumAge = null, +}, +}, +} +}, + RegistryFilters = { - new ClinicalTrialRegistryFilter() +new ClinicalTrialRegistryFilter() { - Conditions = +Conditions = { - "" - }, - StudyTypes = +"" +}, +StudyTypes = { - ClinicalTrialStudyType.Interventional - }, - RecruitmentStatuses = +ClinicalTrialStudyType.Interventional +}, +RecruitmentStatuses = { - ClinicalTrialRecruitmentStatus.UnknownStatus - }, - Sponsors = +ClinicalTrialRecruitmentStatus.UnknownStatus +}, +Sponsors = { - "" - }, - Phases = +"" +}, +Phases = { - ClinicalTrialPhase.NotApplicable - }, - Purposes = +ClinicalTrialPhase.NotApplicable +}, +Purposes = { - ClinicalTrialPurpose.NotApplicable - }, - Ids = +ClinicalTrialPurpose.NotApplicable +}, +Ids = { - "" - }, - Sources = +"" +}, +Sources = { - ClinicalTrialSource.Custom - }, - FacilityNames = +ClinicalTrialSource.Custom +}, +FacilityNames = { - "" - }, - FacilityLocations = +"" +}, +FacilityLocations = { - new GeographicLocation("") +new GeographicLocation("") { - City = "", - State = "", - } - }, - FacilityAreas = +City = "", +State = "", +} +}, +FacilityAreas = { - new GeographicArea(GeoJsonType.Feature, new AreaGeometry(GeoJsonGeometryType.Point, new float[] +new GeographicArea(GeoJsonType.Feature,new AreaGeometry(GeoJsonGeometryType.Point,new List() { - 3.14f - }), new AreaProperties(GeoJsonPropertiesSubType.Circle, 3.14)) - }, - } - }, +123.45F +}),new AreaProperties(GeoJsonPropertiesSubType.Circle,123.45)) +}, +} +}, }) -{ + { Verbose = true, IncludeEvidence = true, }, }; -var operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); -]]> - +Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); +TrialMatcherResult responseData = operation.Value; +]]> - -This sample shows how to call MatchTrialsAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call MatchTrialsAsync and parse the result. "); -var endpoint = new Uri(""); -var client = new ClinicalMatchingClient(endpoint, credential); - -var data = new { - patients = new[] { - new { - id = "", - } - }, -}; - -var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, +}); +Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -335,154 +363,193 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdateDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call MatchTrialsAsync with all parameters and request content, and how to parse the result. +This sample shows how to call MatchTrialsAsync with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ClinicalMatchingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -var data = new { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new { - verbose = true, - includeEvidence = true, - clinicalTrials = new { - customTrials = new[] { - new { - id = "", - eligibilityCriteriaText = "", - demographics = new { - acceptedSex = "all", - acceptedAgeRange = new { - minimumAge = new { - unit = "years", - value = 123.45f, - }, - maximumAge = new { - unit = "years", - value = 123.45f, - }, - }, - }, - metadata = new { - phases = new[] { - "notApplicable" - }, - studyType = "interventional", - recruitmentStatus = "unknownStatus", - conditions = new[] { - "" - }, - sponsors = new[] { - "" - }, - contacts = new[] { - new { - name = "", - email = "", - phone = "", - } - }, - facilities = new[] { - new { - name = "", - city = "", - state = "", - countryOrRegion = "", - } - }, - }, - } - }, - registryFilters = new[] { - new { - conditions = new[] { - "" - }, - studyTypes = new[] { - "interventional" - }, - recruitmentStatuses = new[] { - "unknownStatus" - }, - sponsors = new[] { - "" - }, - phases = new[] { - "notApplicable" - }, - purposes = new[] { - "notApplicable" - }, - ids = new[] { - "" - }, - sources = new[] { - "custom" - }, - facilityNames = new[] { - "" - }, - facilityLocations = new[] { - new { - city = "", - state = "", - countryOrRegion = "", - } - }, - facilityAreas = new[] { - new { - type = "Feature", - geometry = new { - type = "Point", - coordinates = new[] { - 123.45f - }, - }, - properties = new { - subType = "Circle", - radius = 123.45d, - }, - } - }, - } - }, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() + { + ["verbose"] = true, + ["includeEvidence"] = true, + ["clinicalTrials"] = new Dictionary() + { + ["customTrials"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["eligibilityCriteriaText"] = "", +["demographics"] = new Dictionary() +{ +["acceptedSex"] = "all", +["acceptedAgeRange"] = new Dictionary() +{ +["minimumAge"] = new Dictionary() +{ +["unit"] = "years", +["value"] = 123.45F, +}, +["maximumAge"] = null +, +}, +}, +["metadata"] = new Dictionary() +{ +["phases"] = new List() +{ +"notApplicable" +}, +["studyType"] = "interventional", +["recruitmentStatus"] = "unknownStatus", +["conditions"] = new List() +{ +"" +}, +["sponsors"] = new List() +{ +"" +}, +["contacts"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["email"] = "", +["phone"] = "", +} +}, +["facilities"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +}, +} +}, + ["registryFilters"] = new List() +{ +new Dictionary() +{ +["conditions"] = new List() +{ +"" +}, +["studyTypes"] = new List() +{ +"interventional" +}, +["recruitmentStatuses"] = new List() +{ +"unknownStatus" +}, +["sponsors"] = new List() +{ +"" +}, +["phases"] = new List() +{ +"notApplicable" +}, +["purposes"] = new List() +{ +"notApplicable" +}, +["ids"] = new List() +{ +"" +}, +["sources"] = new List() +{ +"custom" +}, +["facilityNames"] = new List() +{ +"" +}, +["facilityLocations"] = new List() +{ +new Dictionary() +{ +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +["facilityAreas"] = new List() +{ +new Dictionary() +{ +["type"] = "Feature", +["geometry"] = new Dictionary() +{ +["type"] = "Point", +["coordinates"] = new List() +{ +123.45F +}, +}, +["properties"] = new Dictionary() +{ +["subType"] = "Circle", +["radius"] = 123.45, +}, +} +}, +} +}, }, }, -}; - -var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data)); - +}); +Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -530,28 +597,29 @@ Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetPr Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("category").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("modelVersion").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("knowledgeGraphLastUpdateDate").ToString()); -]]> - +]]> - -This sample shows how to call MatchTrials with required parameters and request content, and how to parse the result. + +This sample shows how to call MatchTrials and parse the result. "); -var endpoint = new Uri(""); -var client = new ClinicalMatchingClient(endpoint, credential); - -var data = new { - patients = new[] { - new { - id = "", - } - }, -}; - -var operation = client.MatchTrials(WaitUntil.Completed, RequestContent.Create(data)); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, +}); +Operation operation = client.MatchTrials(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -559,154 +627,193 @@ Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdateDateTime").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); ]]> -This sample shows how to call MatchTrials with all parameters and request content, and how to parse the result. +This sample shows how to call MatchTrials with all parameters and request content and parse the result. "); -var endpoint = new Uri(""); -var client = new ClinicalMatchingClient(endpoint, credential); +Uri endpoint = new Uri(""); +AzureKeyCredential credential = new AzureKeyCredential(""); +ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -var data = new { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new { - verbose = true, - includeEvidence = true, - clinicalTrials = new { - customTrials = new[] { - new { - id = "", - eligibilityCriteriaText = "", - demographics = new { - acceptedSex = "all", - acceptedAgeRange = new { - minimumAge = new { - unit = "years", - value = 123.45f, - }, - maximumAge = new { - unit = "years", - value = 123.45f, - }, - }, - }, - metadata = new { - phases = new[] { - "notApplicable" - }, - studyType = "interventional", - recruitmentStatus = "unknownStatus", - conditions = new[] { - "" - }, - sponsors = new[] { - "" - }, - contacts = new[] { - new { - name = "", - email = "", - phone = "", - } - }, - facilities = new[] { - new { - name = "", - city = "", - state = "", - countryOrRegion = "", - } - }, - }, - } - }, - registryFilters = new[] { - new { - conditions = new[] { - "" - }, - studyTypes = new[] { - "interventional" - }, - recruitmentStatuses = new[] { - "unknownStatus" - }, - sponsors = new[] { - "" - }, - phases = new[] { - "notApplicable" - }, - purposes = new[] { - "notApplicable" - }, - ids = new[] { - "" - }, - sources = new[] { - "custom" - }, - facilityNames = new[] { - "" - }, - facilityLocations = new[] { - new { - city = "", - state = "", - countryOrRegion = "", - } - }, - facilityAreas = new[] { - new { - type = "Feature", - geometry = new { - type = "Point", - coordinates = new[] { - 123.45f - }, - }, - properties = new { - subType = "Circle", - radius = 123.45d, - }, - } - }, - } - }, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() + { + ["verbose"] = true, + ["includeEvidence"] = true, + ["clinicalTrials"] = new Dictionary() + { + ["customTrials"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["eligibilityCriteriaText"] = "", +["demographics"] = new Dictionary() +{ +["acceptedSex"] = "all", +["acceptedAgeRange"] = new Dictionary() +{ +["minimumAge"] = new Dictionary() +{ +["unit"] = "years", +["value"] = 123.45F, +}, +["maximumAge"] = null +, +}, +}, +["metadata"] = new Dictionary() +{ +["phases"] = new List() +{ +"notApplicable" +}, +["studyType"] = "interventional", +["recruitmentStatus"] = "unknownStatus", +["conditions"] = new List() +{ +"" +}, +["sponsors"] = new List() +{ +"" +}, +["contacts"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["email"] = "", +["phone"] = "", +} +}, +["facilities"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +}, +} +}, + ["registryFilters"] = new List() +{ +new Dictionary() +{ +["conditions"] = new List() +{ +"" +}, +["studyTypes"] = new List() +{ +"interventional" +}, +["recruitmentStatuses"] = new List() +{ +"unknownStatus" +}, +["sponsors"] = new List() +{ +"" +}, +["phases"] = new List() +{ +"notApplicable" +}, +["purposes"] = new List() +{ +"notApplicable" +}, +["ids"] = new List() +{ +"" +}, +["sources"] = new List() +{ +"custom" +}, +["facilityNames"] = new List() +{ +"" +}, +["facilityLocations"] = new List() +{ +new Dictionary() +{ +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +["facilityAreas"] = new List() +{ +new Dictionary() +{ +["type"] = "Feature", +["geometry"] = new Dictionary() +{ +["type"] = "Point", +["coordinates"] = new List() +{ +123.45F +}, +}, +["properties"] = new Dictionary() +{ +["subType"] = "Circle", +["radius"] = 123.45, +}, +} +}, +} +}, }, }, -}; - -var operation = client.MatchTrials(WaitUntil.Completed, RequestContent.Create(data)); - +}); +Operation operation = client.MatchTrials(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -754,8 +861,7 @@ Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetPr Console.WriteLine(result.GetProperty("results").GetProperty("patients")[0].GetProperty("neededClinicalInfo")[0].GetProperty("category").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("modelVersion").ToString()); Console.WriteLine(result.GetProperty("results").GetProperty("knowledgeGraphLastUpdateDate").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs index 69b3ff71b768..43ad2d998700 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs @@ -7,11 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; +using Azure.Health.Insights.ClinicalMatching; using Azure.Identity; using NUnit.Framework; @@ -23,22 +23,23 @@ public class Samples_ClinicalMatchingClient [Ignore("Only validating compilation of examples")] public void Example_MatchTrials() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ClinicalMatchingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - patients = new[] { - new { - id = "", - } - }, - }; - - var operation = client.MatchTrials(WaitUntil.Completed, RequestContent.Create(data)); - + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, + }); + Operation operation = client.MatchTrials(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -51,155 +52,191 @@ public void Example_MatchTrials() [Ignore("Only validating compilation of examples")] public void Example_MatchTrials_AllParameters() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ClinicalMatchingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() { - verbose = true, - includeEvidence = true, - clinicalTrials = new + ["verbose"] = true, + ["includeEvidence"] = true, + ["clinicalTrials"] = new Dictionary() { - customTrials = new[] { - new { - id = "", - eligibilityCriteriaText = "", - demographics = new { - acceptedSex = "all", - acceptedAgeRange = new { - minimumAge = new { - unit = "years", - value = 123.45f, - }, - maximumAge = new { - unit = "years", - value = 123.45f, - }, - }, - }, - metadata = new { - phases = new[] { - "notApplicable" - }, - studyType = "interventional", - recruitmentStatus = "unknownStatus", - conditions = new[] { - "" - }, - sponsors = new[] { - "" - }, - contacts = new[] { - new { - name = "", - email = "", - phone = "", - } - }, - facilities = new[] { - new { - name = "", - city = "", - state = "", - countryOrRegion = "", - } - }, - }, - } - }, - registryFilters = new[] { - new { - conditions = new[] { - "" - }, - studyTypes = new[] { - "interventional" - }, - recruitmentStatuses = new[] { - "unknownStatus" - }, - sponsors = new[] { - "" - }, - phases = new[] { - "notApplicable" - }, - purposes = new[] { - "notApplicable" - }, - ids = new[] { - "" - }, - sources = new[] { - "custom" - }, - facilityNames = new[] { - "" - }, - facilityLocations = new[] { - new { - city = "", - state = "", - countryOrRegion = "", - } - }, - facilityAreas = new[] { - new { - type = "Feature", - geometry = new { - type = "Point", - coordinates = new[] { - 123.45f - }, - }, - properties = new { - subType = "Circle", - radius = 123.45d, - }, - } - }, - } - }, + ["customTrials"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["eligibilityCriteriaText"] = "", +["demographics"] = new Dictionary() +{ +["acceptedSex"] = "all", +["acceptedAgeRange"] = new Dictionary() +{ +["minimumAge"] = new Dictionary() +{ +["unit"] = "years", +["value"] = 123.45F, +}, +["maximumAge"] = null +, +}, +}, +["metadata"] = new Dictionary() +{ +["phases"] = new List() +{ +"notApplicable" +}, +["studyType"] = "interventional", +["recruitmentStatus"] = "unknownStatus", +["conditions"] = new List() +{ +"" +}, +["sponsors"] = new List() +{ +"" +}, +["contacts"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["email"] = "", +["phone"] = "", +} +}, +["facilities"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +}, +} +}, + ["registryFilters"] = new List() +{ +new Dictionary() +{ +["conditions"] = new List() +{ +"" +}, +["studyTypes"] = new List() +{ +"interventional" +}, +["recruitmentStatuses"] = new List() +{ +"unknownStatus" +}, +["sponsors"] = new List() +{ +"" +}, +["phases"] = new List() +{ +"notApplicable" +}, +["purposes"] = new List() +{ +"notApplicable" +}, +["ids"] = new List() +{ +"" +}, +["sources"] = new List() +{ +"custom" +}, +["facilityNames"] = new List() +{ +"" +}, +["facilityLocations"] = new List() +{ +new Dictionary() +{ +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +["facilityAreas"] = new List() +{ +new Dictionary() +{ +["type"] = "Feature", +["geometry"] = new Dictionary() +{ +["type"] = "Point", +["coordinates"] = new List() +{ +123.45F +}, +}, +["properties"] = new Dictionary() +{ +["subType"] = "Circle", +["radius"] = 123.45, +}, +} +}, +} +}, }, }, - }; - - var operation = client.MatchTrials(WaitUntil.Completed, RequestContent.Create(data)); - + }); + Operation operation = client.MatchTrials(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -251,24 +288,195 @@ public void Example_MatchTrials_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_MatchTrials_Async() + public void Example_MatchTrials_Convenience() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ClinicalMatchingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - var data = new - { - patients = new[] { - new { - id = "", + TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +{ +new PatientRecord("") +}); + Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); + TrialMatcherResult responseData = operation.Value; } - }, + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_MatchTrials_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + + TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +{ +new PatientRecord("") +{ +Info = new PatientInfo() +{ +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = +{ +new ClinicalCodedElement("","") +{ +Name = "", +Value = "", +} +}, +}, +Data = +{ +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) +{ +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} +}) + { + Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials() + { + CustomTrials = +{ +new ClinicalTrialDetails("",new ClinicalTrialMetadata(new List() +{ +"" +}) +{ +Phases = +{ +ClinicalTrialPhase.NotApplicable +}, +StudyType = ClinicalTrialStudyType.Interventional, +RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, +Sponsors = +{ +"" +}, +Contacts = +{ +new ContactDetails() +{ +Name = "", +Email = "", +Phone = "", +} +}, +Facilities = +{ +new ClinicalTrialResearchFacility("","") +{ +City = "", +State = "", +} +}, +}) +{ +EligibilityCriteriaText = "", +Demographics = new ClinicalTrialDemographics() +{ +AcceptedSex = ClinicalTrialAcceptedSex.All, +AcceptedAgeRange = new AcceptedAgeRange() +{ +MinimumAge = new AcceptedAge(AgeUnit.Years,123.45F), +MaximumAge = null, +}, +}, +} +}, + RegistryFilters = +{ +new ClinicalTrialRegistryFilter() +{ +Conditions = +{ +"" +}, +StudyTypes = +{ +ClinicalTrialStudyType.Interventional +}, +RecruitmentStatuses = +{ +ClinicalTrialRecruitmentStatus.UnknownStatus +}, +Sponsors = +{ +"" +}, +Phases = +{ +ClinicalTrialPhase.NotApplicable +}, +Purposes = +{ +ClinicalTrialPurpose.NotApplicable +}, +Ids = +{ +"" +}, +Sources = +{ +ClinicalTrialSource.Custom +}, +FacilityNames = +{ +"" +}, +FacilityLocations = +{ +new GeographicLocation("") +{ +City = "", +State = "", +} +}, +FacilityAreas = +{ +new GeographicArea(GeoJsonType.Feature,new AreaGeometry(GeoJsonGeometryType.Point,new List() +{ +123.45F +}),new AreaProperties(GeoJsonPropertiesSubType.Circle,123.45)) +}, +} +}, + }) + { + Verbose = true, + IncludeEvidence = true, + }, }; + Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); + TrialMatcherResult responseData = operation.Value; + } - var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data)); + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_MatchTrials_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + RequestContent content = RequestContent.Create(new Dictionary() + { + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +} +}, + }); + Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -281,155 +489,191 @@ public async Task Example_MatchTrials_Async() [Ignore("Only validating compilation of examples")] public async Task Example_MatchTrials_AllParameters_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ClinicalMatchingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - patients = new[] { - new { - id = "", - info = new { - sex = "female", - birthDate = "2022-05-10", - clinicalInfo = new[] { - new { - system = "", - code = "", - name = "", - value = "", - } - }, - }, - data = new[] { - new { - type = "note", - clinicalType = "consultation", - id = "", - language = "", - createdDateTime = "2022-05-10T14:57:31.2311892-04:00", - content = new { - sourceType = "inline", - value = "", - }, - } - }, - } - }, - configuration = new + ["patients"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = new Dictionary() +{ +["sex"] = "female", +["birthDate"] = "2022-05-10", +["clinicalInfo"] = new List() +{ +new Dictionary() +{ +["system"] = "", +["code"] = "", +["name"] = "", +["value"] = "", +} +}, +}, +["data"] = new List() +{ +new Dictionary() +{ +["type"] = "note", +["clinicalType"] = "consultation", +["id"] = "", +["language"] = "", +["createdDateTime"] = "2022-05-10T14:57:31.2311892-04:00", +["content"] = new Dictionary() +{ +["sourceType"] = "inline", +["value"] = "", +}, +} +}, +} +}, + ["configuration"] = new Dictionary() { - verbose = true, - includeEvidence = true, - clinicalTrials = new + ["verbose"] = true, + ["includeEvidence"] = true, + ["clinicalTrials"] = new Dictionary() { - customTrials = new[] { - new { - id = "", - eligibilityCriteriaText = "", - demographics = new { - acceptedSex = "all", - acceptedAgeRange = new { - minimumAge = new { - unit = "years", - value = 123.45f, - }, - maximumAge = new { - unit = "years", - value = 123.45f, - }, - }, - }, - metadata = new { - phases = new[] { - "notApplicable" - }, - studyType = "interventional", - recruitmentStatus = "unknownStatus", - conditions = new[] { - "" - }, - sponsors = new[] { - "" - }, - contacts = new[] { - new { - name = "", - email = "", - phone = "", - } - }, - facilities = new[] { - new { - name = "", - city = "", - state = "", - countryOrRegion = "", - } - }, - }, - } - }, - registryFilters = new[] { - new { - conditions = new[] { - "" - }, - studyTypes = new[] { - "interventional" - }, - recruitmentStatuses = new[] { - "unknownStatus" - }, - sponsors = new[] { - "" - }, - phases = new[] { - "notApplicable" - }, - purposes = new[] { - "notApplicable" - }, - ids = new[] { - "" - }, - sources = new[] { - "custom" - }, - facilityNames = new[] { - "" - }, - facilityLocations = new[] { - new { - city = "", - state = "", - countryOrRegion = "", - } - }, - facilityAreas = new[] { - new { - type = "Feature", - geometry = new { - type = "Point", - coordinates = new[] { - 123.45f - }, - }, - properties = new { - subType = "Circle", - radius = 123.45d, - }, - } - }, - } - }, + ["customTrials"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["eligibilityCriteriaText"] = "", +["demographics"] = new Dictionary() +{ +["acceptedSex"] = "all", +["acceptedAgeRange"] = new Dictionary() +{ +["minimumAge"] = new Dictionary() +{ +["unit"] = "years", +["value"] = 123.45F, +}, +["maximumAge"] = null +, +}, +}, +["metadata"] = new Dictionary() +{ +["phases"] = new List() +{ +"notApplicable" +}, +["studyType"] = "interventional", +["recruitmentStatus"] = "unknownStatus", +["conditions"] = new List() +{ +"" +}, +["sponsors"] = new List() +{ +"" +}, +["contacts"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["email"] = "", +["phone"] = "", +} +}, +["facilities"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +}, +} +}, + ["registryFilters"] = new List() +{ +new Dictionary() +{ +["conditions"] = new List() +{ +"" +}, +["studyTypes"] = new List() +{ +"interventional" +}, +["recruitmentStatuses"] = new List() +{ +"unknownStatus" +}, +["sponsors"] = new List() +{ +"" +}, +["phases"] = new List() +{ +"notApplicable" +}, +["purposes"] = new List() +{ +"notApplicable" +}, +["ids"] = new List() +{ +"" +}, +["sources"] = new List() +{ +"custom" +}, +["facilityNames"] = new List() +{ +"" +}, +["facilityLocations"] = new List() +{ +new Dictionary() +{ +["city"] = "", +["state"] = "", +["countryOrRegion"] = "", +} +}, +["facilityAreas"] = new List() +{ +new Dictionary() +{ +["type"] = "Feature", +["geometry"] = new Dictionary() +{ +["type"] = "Point", +["coordinates"] = new List() +{ +123.45F +}, +}, +["properties"] = new Dictionary() +{ +["subType"] = "Circle", +["radius"] = 123.45, +}, +} +}, +} +}, }, }, - }; - - var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data)); - + }); + Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("jobId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -483,153 +727,170 @@ public async Task Example_MatchTrials_AllParameters_Async() [Ignore("Only validating compilation of examples")] public async Task Example_MatchTrials_Convenience_Async() { - var credential = new AzureKeyCredential(""); - var endpoint = new Uri(""); - var client = new ClinicalMatchingClient(endpoint, credential); + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - var trialMatcherData = new TrialMatcherData(new PatientRecord[] - { - new PatientRecord("") + TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +{ +new PatientRecord("") +}); + Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); + TrialMatcherResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_MatchTrials_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); + + TrialMatcherData trialMatcherData = new TrialMatcherData(new List() +{ +new PatientRecord("") { - Info = new PatientInfo() +Info = new PatientInfo() { - Sex = PatientInfoSex.Female, - BirthDate = DateTimeOffset.UtcNow, - ClinicalInfo = +Sex = PatientInfoSex.Female, +BirthDate = DateTimeOffset.Parse("2022-05-10"), +ClinicalInfo = { - new ClinicalCodedElement("", "") +new ClinicalCodedElement("","") { - Name = "", - Value = "", - } - }, - }, - Data = +Name = "", +Value = "", +} +}, +}, +Data = { - new PatientDocument(DocumentType.Note, "", new DocumentContent(DocumentContentSourceType.Inline, "")) +new PatientDocument(DocumentType.Note,"",new DocumentContent(DocumentContentSourceType.Inline,"")) { - ClinicalType = ClinicalDocumentType.Consultation, - Language = "", - CreatedDateTime = DateTimeOffset.UtcNow, - } - }, - } - }) +ClinicalType = ClinicalDocumentType.Consultation, +Language = "", +CreatedDateTime = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +} +}, +} +}) { Configuration = new TrialMatcherModelConfiguration(new ClinicalTrials() { CustomTrials = { - new ClinicalTrialDetails("", new ClinicalTrialMetadata(new string[] +new ClinicalTrialDetails("",new ClinicalTrialMetadata(new List() { - "" - }) +"" +}) { - Phases = +Phases = { - ClinicalTrialPhase.NotApplicable - }, - StudyType = ClinicalTrialStudyType.Interventional, - RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, - Sponsors = +ClinicalTrialPhase.NotApplicable +}, +StudyType = ClinicalTrialStudyType.Interventional, +RecruitmentStatus = ClinicalTrialRecruitmentStatus.UnknownStatus, +Sponsors = { - "" - }, - Contacts = +"" +}, +Contacts = { - new ContactDetails() +new ContactDetails() { - Name = "", - Email = "", - Phone = "", - } - }, - Facilities = +Name = "", +Email = "", +Phone = "", +} +}, +Facilities = { - new ClinicalTrialResearchFacility("", "") +new ClinicalTrialResearchFacility("","") { - City = "", - State = "", - } - }, - }) +City = "", +State = "", +} +}, +}) { - EligibilityCriteriaText = "", - Demographics = new ClinicalTrialDemographics() +EligibilityCriteriaText = "", +Demographics = new ClinicalTrialDemographics() { - AcceptedSex = ClinicalTrialAcceptedSex.All, - AcceptedAgeRange = new AcceptedAgeRange() +AcceptedSex = ClinicalTrialAcceptedSex.All, +AcceptedAgeRange = new AcceptedAgeRange() { - MinimumAge = new AcceptedAge(AgeUnit.Years, 3.14f), - MaximumAge = new AcceptedAge(AgeUnit.Years, 3.14f), - }, - }, - } - }, +MinimumAge = new AcceptedAge(AgeUnit.Years,123.45F), +MaximumAge = null, +}, +}, +} +}, RegistryFilters = { - new ClinicalTrialRegistryFilter() +new ClinicalTrialRegistryFilter() { - Conditions = +Conditions = { - "" - }, - StudyTypes = +"" +}, +StudyTypes = { - ClinicalTrialStudyType.Interventional - }, - RecruitmentStatuses = +ClinicalTrialStudyType.Interventional +}, +RecruitmentStatuses = { - ClinicalTrialRecruitmentStatus.UnknownStatus - }, - Sponsors = +ClinicalTrialRecruitmentStatus.UnknownStatus +}, +Sponsors = { - "" - }, - Phases = +"" +}, +Phases = { - ClinicalTrialPhase.NotApplicable - }, - Purposes = +ClinicalTrialPhase.NotApplicable +}, +Purposes = { - ClinicalTrialPurpose.NotApplicable - }, - Ids = +ClinicalTrialPurpose.NotApplicable +}, +Ids = { - "" - }, - Sources = +"" +}, +Sources = { - ClinicalTrialSource.Custom - }, - FacilityNames = +ClinicalTrialSource.Custom +}, +FacilityNames = { - "" - }, - FacilityLocations = +"" +}, +FacilityLocations = { - new GeographicLocation("") +new GeographicLocation("") { - City = "", - State = "", - } - }, - FacilityAreas = +City = "", +State = "", +} +}, +FacilityAreas = { - new GeographicArea(GeoJsonType.Feature, new AreaGeometry(GeoJsonGeometryType.Point, new float[] +new GeographicArea(GeoJsonType.Feature,new AreaGeometry(GeoJsonGeometryType.Point,new List() { - 3.14f - }), new AreaProperties(GeoJsonPropertiesSubType.Circle, 3.14)) - }, - } - }, +123.45F +}),new AreaProperties(GeoJsonPropertiesSubType.Circle,123.45)) +}, +} +}, }) { Verbose = true, IncludeEvidence = true, }, }; - var operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); + Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); + TrialMatcherResult responseData = operation.Value; } } } diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml index c902fef7a37c..568fcc5fa92b 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestAdministrationClient.xml @@ -2,88 +2,96 @@ - -This sample shows how to call CreateOrUpdateTestAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateTestAsync and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -var data = new {}; - -Response response = await client.CreateOrUpdateTestAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateTestAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateTestAsync with all parameters and request content, and how to parse the result. -"); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new { - passFailCriteria = new { - passFailMetrics = new { - key = new { - clientMetric = "response_time_ms", - aggregate = "count", - condition = "", - requestName = "", - value = 123.45d, - action = "continue", +This sample shows how to call CreateOrUpdateTestAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["passFailCriteria"] = new Dictionary() + { + ["passFailMetrics"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["clientMetric"] = "response_time_ms", + ["aggregate"] = "count", + ["condition"] = "", + ["requestName"] = "", + ["value"] = 123.45, + ["action"] = "continue", }, }, }, - secrets = new { - key = new { - value = "", - type = "AKV_SECRET_URI", + ["secrets"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["value"] = "", + ["type"] = "AKV_SECRET_URI", }, }, - certificate = new { - value = "", - type = "AKV_CERT_URI", - name = "", + ["certificate"] = new Dictionary() + { + ["value"] = "", + ["type"] = "AKV_CERT_URI", + ["name"] = "", }, - environmentVariables = new { - key = "", + ["environmentVariables"] = new Dictionary() + { + ["key"] = "", }, - loadTestConfiguration = new { - engineInstances = 1234, - splitAllCSVs = true, - quickStartTest = true, - optionalLoadTestConfig = new { - endpointUrl = "", - virtualUsers = 1234, - rampUpTime = 1234, - duration = 1234, + ["loadTestConfiguration"] = new Dictionary() + { + ["engineInstances"] = 1234, + ["splitAllCSVs"] = true, + ["quickStartTest"] = true, + ["optionalLoadTestConfig"] = new Dictionary() + { + ["endpointUrl"] = "", + ["virtualUsers"] = 1234, + ["rampUpTime"] = 1234, + ["duration"] = 1234, }, }, - description = "", - displayName = "", - subnetId = "", - keyvaultReferenceIdentityType = "", - keyvaultReferenceIdentityId = "", -}; - -Response response = await client.CreateOrUpdateTestAsync("", RequestContent.Create(data)); + ["description"] = "", + ["displayName"] = "", + ["subnetId"] = "", + ["keyvaultReferenceIdentityType"] = "", + ["keyvaultReferenceIdentityId"] = "", +}); +Response response = await client.CreateOrUpdateTestAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -131,92 +139,99 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateTest with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateTest and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -Response response = client.CreateOrUpdateTest("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateTest("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateTest with all parameters and request content, and how to parse the result. -"); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new { - passFailCriteria = new { - passFailMetrics = new { - key = new { - clientMetric = "response_time_ms", - aggregate = "count", - condition = "", - requestName = "", - value = 123.45d, - action = "continue", +This sample shows how to call CreateOrUpdateTest with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["passFailCriteria"] = new Dictionary() + { + ["passFailMetrics"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["clientMetric"] = "response_time_ms", + ["aggregate"] = "count", + ["condition"] = "", + ["requestName"] = "", + ["value"] = 123.45, + ["action"] = "continue", }, }, }, - secrets = new { - key = new { - value = "", - type = "AKV_SECRET_URI", + ["secrets"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["value"] = "", + ["type"] = "AKV_SECRET_URI", }, }, - certificate = new { - value = "", - type = "AKV_CERT_URI", - name = "", + ["certificate"] = new Dictionary() + { + ["value"] = "", + ["type"] = "AKV_CERT_URI", + ["name"] = "", }, - environmentVariables = new { - key = "", + ["environmentVariables"] = new Dictionary() + { + ["key"] = "", }, - loadTestConfiguration = new { - engineInstances = 1234, - splitAllCSVs = true, - quickStartTest = true, - optionalLoadTestConfig = new { - endpointUrl = "", - virtualUsers = 1234, - rampUpTime = 1234, - duration = 1234, + ["loadTestConfiguration"] = new Dictionary() + { + ["engineInstances"] = 1234, + ["splitAllCSVs"] = true, + ["quickStartTest"] = true, + ["optionalLoadTestConfig"] = new Dictionary() + { + ["endpointUrl"] = "", + ["virtualUsers"] = 1234, + ["rampUpTime"] = 1234, + ["duration"] = 1234, }, }, - description = "", - displayName = "", - subnetId = "", - keyvaultReferenceIdentityType = "", - keyvaultReferenceIdentityId = "", -}; - -Response response = client.CreateOrUpdateTest("", RequestContent.Create(data)); + ["description"] = "", + ["displayName"] = "", + ["subnetId"] = "", + ["keyvaultReferenceIdentityType"] = "", + ["keyvaultReferenceIdentityId"] = "", +}); +Response response = client.CreateOrUpdateTest("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -264,60 +279,86 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call DeleteTestAsync with required parameters. + +This sample shows how to call DeleteTestAsync. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTestAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = await client.DeleteTestAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTest with required parameters. + +This sample shows how to call DeleteTest. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTest(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTest with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = client.DeleteTest(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetTestAsync with required parameters and parse the result. + +This sample shows how to call GetTestAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = await client.GetTestAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTestAsync with all parameters and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetTestAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -365,34 +406,44 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetTest with required parameters and parse the result. + +This sample shows how to call GetTest and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = client.GetTest(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTest with all parameters and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetTest(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -440,20 +491,28 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - - - - - +]]> + + - -This sample shows how to call GetTestFileAsync with required parameters and parse the result. + +This sample shows how to call GetTestFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = await client.GetTestFileAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTestFileAsync with all parameters and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetTestFileAsync("", ""); @@ -464,16 +523,26 @@ Console.WriteLine(result.GetProperty("fileType").ToString()); Console.WriteLine(result.GetProperty("expireDateTime").ToString()); Console.WriteLine(result.GetProperty("validationStatus").ToString()); Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); -]]> - +]]> - -This sample shows how to call GetTestFile with required parameters and parse the result. + +This sample shows how to call GetTestFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = client.GetTestFile("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTestFile with all parameters and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetTestFile("", ""); @@ -484,368 +553,481 @@ Console.WriteLine(result.GetProperty("fileType").ToString()); Console.WriteLine(result.GetProperty("expireDateTime").ToString()); Console.WriteLine(result.GetProperty("validationStatus").ToString()); Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); -]]> - +]]> - -This sample shows how to call DeleteTestFileAsync with required parameters. + +This sample shows how to call DeleteTestFileAsync. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestFileAsync("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTestFileAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = await client.DeleteTestFileAsync("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTestFile with required parameters. + +This sample shows how to call DeleteTestFile. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTestFile("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTestFile with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = client.DeleteTestFile("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call CreateOrUpdateAppComponentsAsync with required parameters and request content and parse the result. -"); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new { - components = new { - key = new { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", - }, + +This sample shows how to call CreateOrUpdateAppComponentsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; +}); +Response response = await client.CreateOrUpdateAppComponentsAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call CreateOrUpdateAppComponentsAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -Response response = await client.CreateOrUpdateAppComponentsAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", + }, + }, +}); +Response response = await client.CreateOrUpdateAppComponentsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateAppComponents with required parameters and request content and parse the result. -"); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new { - components = new { - key = new { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", - }, + +This sample shows how to call CreateOrUpdateAppComponents and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; +}); +Response response = client.CreateOrUpdateAppComponents("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call CreateOrUpdateAppComponents with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -Response response = client.CreateOrUpdateAppComponents("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", + }, + }, +}); +Response response = client.CreateOrUpdateAppComponents("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetAppComponentsAsync with required parameters and parse the result. + +This sample shows how to call GetAppComponentsAsync and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetAppComponentsAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call GetAppComponentsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = await client.GetAppComponentsAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetAppComponents with required parameters and parse the result. + +This sample shows how to call GetAppComponents and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetAppComponents(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call GetAppComponents with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = client.GetAppComponents(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateServerMetricsConfigAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateServerMetricsConfigAsync and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateServerMetricsConfigAsync with all parameters and request content, and how to parse the result. -"); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new { - metrics = new { - key = new { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", +This sample shows how to call CreateOrUpdateServerMetricsConfigAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["metrics"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, -}; - -Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateServerMetricsConfig with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateServerMetricsConfig and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateServerMetricsConfig with all parameters and request content, and how to parse the result. -"); -var client = new LoadTestAdministrationClient(endpoint, credential); - -var data = new { - metrics = new { - key = new { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", +This sample shows how to call CreateOrUpdateServerMetricsConfig with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["metrics"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, -}; - -Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetServerMetricsConfigAsync with required parameters and parse the result. + +This sample shows how to call GetServerMetricsConfigAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = await client.GetServerMetricsConfigAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetServerMetricsConfigAsync with all parameters and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetServerMetricsConfigAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetServerMetricsConfig with required parameters and parse the result. + +This sample shows how to call GetServerMetricsConfig and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +Response response = client.GetServerMetricsConfig(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetServerMetricsConfig with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetServerMetricsConfig(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - - - - - +]]> + + - -This sample shows how to call GetTestFilesAsync with required parameters and parse the result. + +This sample shows how to call GetTestFilesAsync and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -await foreach (var item in client.GetTestFilesAsync("")) +await foreach (BinaryData item in client.GetTestFilesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("fileType").ToString()); - Console.WriteLine(result.GetProperty("expireDateTime").ToString()); - Console.WriteLine(result.GetProperty("validationStatus").ToString()); - Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetTestFilesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTestFilesAsync("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("fileName").ToString()); + Console.WriteLine(result[0].GetProperty("fileType").ToString()); + Console.WriteLine(result[0].GetProperty("expireDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("validationStatus").ToString()); + Console.WriteLine(result[0].GetProperty("validationFailureDetails").ToString()); +} +]]> - -This sample shows how to call GetTestFiles with required parameters and parse the result. + +This sample shows how to call GetTestFiles and parse the result. "); -var client = new LoadTestAdministrationClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); -foreach (var item in client.GetTestFiles("")) +foreach (BinaryData item in client.GetTestFiles("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("fileType").ToString()); - Console.WriteLine(result.GetProperty("expireDateTime").ToString()); - Console.WriteLine(result.GetProperty("validationStatus").ToString()); - Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetTestFiles with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetTestFiles("")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("fileName").ToString()); + Console.WriteLine(result[0].GetProperty("fileType").ToString()); + Console.WriteLine(result[0].GetProperty("expireDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("validationStatus").ToString()); + Console.WriteLine(result[0].GetProperty("validationFailureDetails").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml index 0fb3996a256b..9e6cac7b72c7 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/Generated/Docs/LoadTestRunClient.xml @@ -1,50 +1,59 @@ - - - - + + - -This sample shows how to call GetTestRunAsync with required parameters and parse the result. + +This sample shows how to call GetTestRunAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetTestRunAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTestRunAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.GetTestRunAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -111,49 +120,59 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetTestRun with required parameters and parse the result. + +This sample shows how to call GetTestRun and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetTestRun(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTestRun with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.GetTestRun(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -220,42 +239,68 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call DeleteTestRunAsync with required parameters. + +This sample shows how to call DeleteTestRunAsync. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.DeleteTestRunAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTestRunAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.DeleteTestRunAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTestRun with required parameters. + +This sample shows how to call DeleteTestRun. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.DeleteTestRun(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTestRun with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.DeleteTestRun(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetTestRunFileAsync with required parameters and parse the result. + +This sample shows how to call GetTestRunFileAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.GetTestRunFileAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTestRunFileAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetTestRunFileAsync("", ""); @@ -266,16 +311,26 @@ Console.WriteLine(result.GetProperty("fileType").ToString()); Console.WriteLine(result.GetProperty("expireDateTime").ToString()); Console.WriteLine(result.GetProperty("validationStatus").ToString()); Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); -]]> - +]]> - -This sample shows how to call GetTestRunFile with required parameters and parse the result. + +This sample shows how to call GetTestRunFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.GetTestRunFile("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTestRunFile with all parameters and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetTestRunFile("", ""); @@ -286,49 +341,59 @@ Console.WriteLine(result.GetProperty("fileType").ToString()); Console.WriteLine(result.GetProperty("expireDateTime").ToString()); Console.WriteLine(result.GetProperty("validationStatus").ToString()); Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); -]]> - +]]> - -This sample shows how to call StopTestRunAsync with required parameters and parse the result. + +This sample shows how to call StopTestRunAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.StopTestRunAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call StopTestRunAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.StopTestRunAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -395,49 +460,59 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call StopTestRun with required parameters and parse the result. + +This sample shows how to call StopTestRun and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.StopTestRun(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); -Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); -Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call StopTestRun with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.StopTestRun(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); +Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); -Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); +Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -504,48 +579,78 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetMetricNamespacesAsync with required parameters and parse the result. + +This sample shows how to call GetMetricNamespacesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.GetMetricNamespacesAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].ToString()); +]]> +This sample shows how to call GetMetricNamespacesAsync with all parameters and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetMetricNamespacesAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); -]]> - +]]> - -This sample shows how to call GetMetricNamespaces with required parameters and parse the result. + +This sample shows how to call GetMetricNamespaces and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.GetMetricNamespaces(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].ToString()); +]]> +This sample shows how to call GetMetricNamespaces with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetMetricNamespaces(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); -]]> - +]]> - -This sample shows how to call GetMetricDefinitionsAsync with required parameters and parse the result. + +This sample shows how to call GetMetricDefinitionsAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.GetMetricDefinitionsAsync("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].ToString()); +]]> +This sample shows how to call GetMetricDefinitionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetMetricDefinitionsAsync("", ""); @@ -559,16 +664,26 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("primaryAggregation Console.WriteLine(result.GetProperty("value")[0].GetProperty("supportedAggregationTypes")[0].ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("metricAvailabilities")[0].GetProperty("timeGrain").ToString()); -]]> - +]]> - -This sample shows how to call GetMetricDefinitions with required parameters and parse the result. + +This sample shows how to call GetMetricDefinitions and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.GetMetricDefinitions("", ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].ToString()); +]]> +This sample shows how to call GetMetricDefinitions with all parameters and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetMetricDefinitions("", ""); @@ -582,444 +697,519 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("primaryAggregation Console.WriteLine(result.GetProperty("value")[0].GetProperty("supportedAggregationTypes")[0].ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("unit").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("metricAvailabilities")[0].GetProperty("timeGrain").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateAppComponentsAsync with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdateAppComponentsAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new { - components = new { - key = new { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", - }, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; +}); +Response response = await client.CreateOrUpdateAppComponentsAsync("", content); -Response response = await client.CreateOrUpdateAppComponentsAsync("", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call CreateOrUpdateAppComponentsAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", + }, + }, +}); +Response response = await client.CreateOrUpdateAppComponentsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateAppComponents with required parameters and request content and parse the result. + +This sample shows how to call CreateOrUpdateAppComponents and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new { - components = new { - key = new { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", - }, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary(), }, -}; +}); +Response response = client.CreateOrUpdateAppComponents("", content); -Response response = client.CreateOrUpdateAppComponents("", RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call CreateOrUpdateAppComponents with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["components"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", + }, + }, +}); +Response response = client.CreateOrUpdateAppComponents("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetAppComponentsAsync with required parameters and parse the result. + +This sample shows how to call GetAppComponentsAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetAppComponentsAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call GetAppComponentsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.GetAppComponentsAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetAppComponents with required parameters and parse the result. + +This sample shows how to call GetAppComponents and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetAppComponents(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); -Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); +]]> +This sample shows how to call GetAppComponents with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.GetAppComponents(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateServerMetricsConfigAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateServerMetricsConfigAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateServerMetricsConfigAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateServerMetricsConfigAsync with all parameters and request content and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new { - metrics = new { - key = new { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["metrics"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, -}; - -Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateServerMetricsConfig with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateServerMetricsConfig and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateServerMetricsConfig with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateServerMetricsConfig with all parameters and request content and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new { - metrics = new { - key = new { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["metrics"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, -}; - -Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetServerMetricsConfigAsync with required parameters and parse the result. + +This sample shows how to call GetServerMetricsConfigAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = await client.GetServerMetricsConfigAsync(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetServerMetricsConfigAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetServerMetricsConfigAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - +]]> - -This sample shows how to call GetServerMetricsConfig with required parameters and parse the result. + +This sample shows how to call GetServerMetricsConfig and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); + +Response response = client.GetServerMetricsConfig(""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetServerMetricsConfig with all parameters and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetServerMetricsConfig(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); -Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); +Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); Console.WriteLine(result.GetProperty("lastModifiedBy").ToString()); -]]> - - - - - +]]> + + - -This sample shows how to call GetMetricsAsync with required parameters and parse the result. + +This sample shows how to call GetMetricsAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -var data = new {}; - -await foreach (var item in client.GetMetricsAsync("", "", "", "", RequestContent.Create(data))) +RequestContent content = null; +await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetMetricsAsync with all parameters and request content, and how to parse the result. +This sample shows how to call GetMetricsAsync with all parameters and request content and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new { - filters = new[] { - new { - name = "", - values = new[] { - "" - }, - } - }, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -await foreach (var item in client.GetMetricsAsync("", "", "", "", RequestContent.Create(data), "", "")) +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["filters"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["values"] = new List() +{ +"" +}, +} +}, +}); +await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("data")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("data")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("timestamp").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("value").ToString()); } -]]> - +]]> - -This sample shows how to call GetMetrics with required parameters and parse the result. + +This sample shows how to call GetMetrics and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -var data = new {}; - -foreach (var item in client.GetMetrics("", "", "", "", RequestContent.Create(data))) +RequestContent content = null; +foreach (BinaryData item in client.GetMetrics("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetMetrics with all parameters and request content, and how to parse the result. +This sample shows how to call GetMetrics with all parameters and request content and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); - -var data = new { - filters = new[] { - new { - name = "", - values = new[] { - "" - }, - } - }, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -foreach (var item in client.GetMetrics("", "", "", "", RequestContent.Create(data), "", "")) +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["filters"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["values"] = new List() +{ +"" +}, +} +}, +}); +foreach (BinaryData item in client.GetMetrics("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("data")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("data")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("timestamp").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("value").ToString()); } -]]> - +]]> - -This sample shows how to call GetMetricDimensionValuesAsync with required parameters and parse the result. + +This sample shows how to call GetMetricDimensionValuesAsync and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -await foreach (var item in client.GetMetricDimensionValuesAsync("", "", "", "", "")) +await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetMetricDimensionValuesAsync with all parameters, and how to parse the result. +This sample shows how to call GetMetricDimensionValuesAsync with all parameters and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -await foreach (var item in client.GetMetricDimensionValuesAsync("", "", "", "", "", "")) +await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } -]]> - +]]> - -This sample shows how to call GetMetricDimensionValues with required parameters and parse the result. + +This sample shows how to call GetMetricDimensionValues and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -foreach (var item in client.GetMetricDimensionValues("", "", "", "", "")) +foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } ]]> -This sample shows how to call GetMetricDimensionValues with all parameters, and how to parse the result. +This sample shows how to call GetMetricDimensionValues with all parameters and parse the result. "); -var client = new LoadTestRunClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); -foreach (var item in client.GetMetricDimensionValues("", "", "", "", "", "")) +foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } -]]> - +]]> \ No newline at end of file diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestAdministrationClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestAdministrationClient.cs index 7bdc52dea772..45b9e42e1986 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestAdministrationClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestAdministrationClient.cs @@ -7,11 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; +using Azure.Developer.LoadTesting; using Azure.Identity; using NUnit.Framework; @@ -23,13 +23,12 @@ public class Samples_LoadTestAdministrationClient [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateTest() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new { }; - - Response response = client.CreateOrUpdateTest("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateTest("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -39,82 +38,81 @@ public void Example_CreateOrUpdateTest() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateTest_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - passFailCriteria = new + ["passFailCriteria"] = new Dictionary() { - passFailMetrics = new + ["passFailMetrics"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - clientMetric = "response_time_ms", - aggregate = "count", - condition = "", - requestName = "", - value = 123.45d, - action = "continue", + ["clientMetric"] = "response_time_ms", + ["aggregate"] = "count", + ["condition"] = "", + ["requestName"] = "", + ["value"] = 123.45, + ["action"] = "continue", }, }, }, - secrets = new + ["secrets"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - value = "", - type = "AKV_SECRET_URI", + ["value"] = "", + ["type"] = "AKV_SECRET_URI", }, }, - certificate = new + ["certificate"] = new Dictionary() { - value = "", - type = "AKV_CERT_URI", - name = "", + ["value"] = "", + ["type"] = "AKV_CERT_URI", + ["name"] = "", }, - environmentVariables = new + ["environmentVariables"] = new Dictionary() { - key = "", + ["key"] = "", }, - loadTestConfiguration = new + ["loadTestConfiguration"] = new Dictionary() { - engineInstances = 1234, - splitAllCSVs = true, - quickStartTest = true, - optionalLoadTestConfig = new + ["engineInstances"] = 1234, + ["splitAllCSVs"] = true, + ["quickStartTest"] = true, + ["optionalLoadTestConfig"] = new Dictionary() { - endpointUrl = "", - virtualUsers = 1234, - rampUpTime = 1234, - duration = 1234, + ["endpointUrl"] = "", + ["virtualUsers"] = 1234, + ["rampUpTime"] = 1234, + ["duration"] = 1234, }, }, - description = "", - displayName = "", - subnetId = "", - keyvaultReferenceIdentityType = "", - keyvaultReferenceIdentityId = "", - }; - - Response response = client.CreateOrUpdateTest("", RequestContent.Create(data)); + ["description"] = "", + ["displayName"] = "", + ["subnetId"] = "", + ["keyvaultReferenceIdentityType"] = "", + ["keyvaultReferenceIdentityId"] = "", + }); + Response response = client.CreateOrUpdateTest("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -168,13 +166,12 @@ public void Example_CreateOrUpdateTest_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateTest_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - Response response = await client.CreateOrUpdateTestAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateTestAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -184,82 +181,81 @@ public async Task Example_CreateOrUpdateTest_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateTest_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - passFailCriteria = new + ["passFailCriteria"] = new Dictionary() { - passFailMetrics = new + ["passFailMetrics"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - clientMetric = "response_time_ms", - aggregate = "count", - condition = "", - requestName = "", - value = 123.45d, - action = "continue", + ["clientMetric"] = "response_time_ms", + ["aggregate"] = "count", + ["condition"] = "", + ["requestName"] = "", + ["value"] = 123.45, + ["action"] = "continue", }, }, }, - secrets = new + ["secrets"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - value = "", - type = "AKV_SECRET_URI", + ["value"] = "", + ["type"] = "AKV_SECRET_URI", }, }, - certificate = new + ["certificate"] = new Dictionary() { - value = "", - type = "AKV_CERT_URI", - name = "", + ["value"] = "", + ["type"] = "AKV_CERT_URI", + ["name"] = "", }, - environmentVariables = new + ["environmentVariables"] = new Dictionary() { - key = "", + ["key"] = "", }, - loadTestConfiguration = new + ["loadTestConfiguration"] = new Dictionary() { - engineInstances = 1234, - splitAllCSVs = true, - quickStartTest = true, - optionalLoadTestConfig = new + ["engineInstances"] = 1234, + ["splitAllCSVs"] = true, + ["quickStartTest"] = true, + ["optionalLoadTestConfig"] = new Dictionary() { - endpointUrl = "", - virtualUsers = 1234, - rampUpTime = 1234, - duration = 1234, + ["endpointUrl"] = "", + ["virtualUsers"] = 1234, + ["rampUpTime"] = 1234, + ["duration"] = 1234, }, }, - description = "", - displayName = "", - subnetId = "", - keyvaultReferenceIdentityType = "", - keyvaultReferenceIdentityId = "", - }; - - Response response = await client.CreateOrUpdateTestAsync("", RequestContent.Create(data)); + ["description"] = "", + ["displayName"] = "", + ["subnetId"] = "", + ["keyvaultReferenceIdentityType"] = "", + ["keyvaultReferenceIdentityId"] = "", + }); + Response response = await client.CreateOrUpdateTestAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -313,9 +309,9 @@ public async Task Example_CreateOrUpdateTest_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteTest() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTest(""); Console.WriteLine(response.Status); @@ -325,9 +321,9 @@ public void Example_DeleteTest() [Ignore("Only validating compilation of examples")] public void Example_DeleteTest_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTest(""); Console.WriteLine(response.Status); @@ -337,9 +333,9 @@ public void Example_DeleteTest_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTest_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestAsync(""); Console.WriteLine(response.Status); @@ -349,9 +345,9 @@ public async Task Example_DeleteTest_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTest_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestAsync(""); Console.WriteLine(response.Status); @@ -361,9 +357,9 @@ public async Task Example_DeleteTest_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTest() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetTest(""); @@ -375,27 +371,27 @@ public void Example_GetTest() [Ignore("Only validating compilation of examples")] public void Example_GetTest_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetTest(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -449,9 +445,9 @@ public void Example_GetTest_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTest_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetTestAsync(""); @@ -463,27 +459,27 @@ public async Task Example_GetTest_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTest_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetTestAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -537,9 +533,9 @@ public async Task Example_GetTest_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTestFile() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetTestFile("", ""); @@ -551,9 +547,9 @@ public void Example_GetTestFile() [Ignore("Only validating compilation of examples")] public void Example_GetTestFile_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetTestFile("", ""); @@ -570,9 +566,9 @@ public void Example_GetTestFile_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestFile_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetTestFileAsync("", ""); @@ -584,9 +580,9 @@ public async Task Example_GetTestFile_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestFile_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetTestFileAsync("", ""); @@ -603,9 +599,9 @@ public async Task Example_GetTestFile_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteTestFile() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTestFile("", ""); Console.WriteLine(response.Status); @@ -615,9 +611,9 @@ public void Example_DeleteTestFile() [Ignore("Only validating compilation of examples")] public void Example_DeleteTestFile_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.DeleteTestFile("", ""); Console.WriteLine(response.Status); @@ -627,9 +623,9 @@ public void Example_DeleteTestFile_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTestFile_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestFileAsync("", ""); Console.WriteLine(response.Status); @@ -639,9 +635,9 @@ public async Task Example_DeleteTestFile_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTestFile_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.DeleteTestFileAsync("", ""); Console.WriteLine(response.Status); @@ -651,56 +647,54 @@ public async Task Example_DeleteTestFile_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateAppComponents() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdateAppComponents("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateAppComponents("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateAppComponents_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", }, }, - }; - - Response response = client.CreateOrUpdateAppComponents("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateAppComponents("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -712,56 +706,54 @@ public void Example_CreateOrUpdateAppComponents_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateAppComponents_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAppComponentsAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAppComponentsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateAppComponents_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", }, }, - }; - - Response response = await client.CreateOrUpdateAppComponentsAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAppComponentsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -773,34 +765,34 @@ public async Task Example_CreateOrUpdateAppComponents_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAppComponents() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetAppComponents(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetAppComponents_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetAppComponents(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -812,34 +804,34 @@ public void Example_GetAppComponents_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAppComponents_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetAppComponentsAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetAppComponents_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetAppComponentsAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -851,13 +843,12 @@ public async Task Example_GetAppComponents_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateServerMetricsConfig() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -867,39 +858,38 @@ public void Example_CreateOrUpdateServerMetricsConfig() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateServerMetricsConfig_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - metrics = new + ["metrics"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, - }; - - Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -910,13 +900,12 @@ public void Example_CreateOrUpdateServerMetricsConfig_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateServerMetricsConfig_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -926,39 +915,38 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateServerMetricsConfig_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - metrics = new + ["metrics"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, - }; - - Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -969,9 +957,9 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_AllParameters_Async( [Ignore("Only validating compilation of examples")] public void Example_GetServerMetricsConfig() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetServerMetricsConfig(""); @@ -983,22 +971,22 @@ public void Example_GetServerMetricsConfig() [Ignore("Only validating compilation of examples")] public void Example_GetServerMetricsConfig_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = client.GetServerMetricsConfig(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -1009,9 +997,9 @@ public void Example_GetServerMetricsConfig_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetServerMetricsConfig_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetServerMetricsConfigAsync(""); @@ -1023,22 +1011,22 @@ public async Task Example_GetServerMetricsConfig_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetServerMetricsConfig_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); Response response = await client.GetServerMetricsConfigAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -1049,14 +1037,14 @@ public async Task Example_GetServerMetricsConfig_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTestFiles() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - foreach (var item in client.GetTestFiles("")) + foreach (BinaryData item in client.GetTestFiles("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1064,19 +1052,19 @@ public void Example_GetTestFiles() [Ignore("Only validating compilation of examples")] public void Example_GetTestFiles_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - foreach (var item in client.GetTestFiles("")) + foreach (BinaryData item in client.GetTestFiles("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("fileType").ToString()); - Console.WriteLine(result.GetProperty("expireDateTime").ToString()); - Console.WriteLine(result.GetProperty("validationStatus").ToString()); - Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); + Console.WriteLine(result[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("fileName").ToString()); + Console.WriteLine(result[0].GetProperty("fileType").ToString()); + Console.WriteLine(result[0].GetProperty("expireDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("validationStatus").ToString()); + Console.WriteLine(result[0].GetProperty("validationFailureDetails").ToString()); } } @@ -1084,14 +1072,14 @@ public void Example_GetTestFiles_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestFiles_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - await foreach (var item in client.GetTestFilesAsync("")) + await foreach (BinaryData item in client.GetTestFilesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1099,19 +1087,19 @@ public async Task Example_GetTestFiles_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestFiles_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestAdministrationClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential); - await foreach (var item in client.GetTestFilesAsync("")) + await foreach (BinaryData item in client.GetTestFilesAsync("")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("fileName").ToString()); - Console.WriteLine(result.GetProperty("fileType").ToString()); - Console.WriteLine(result.GetProperty("expireDateTime").ToString()); - Console.WriteLine(result.GetProperty("validationStatus").ToString()); - Console.WriteLine(result.GetProperty("validationFailureDetails").ToString()); + Console.WriteLine(result[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("fileName").ToString()); + Console.WriteLine(result[0].GetProperty("fileType").ToString()); + Console.WriteLine(result[0].GetProperty("expireDateTime").ToString()); + Console.WriteLine(result[0].GetProperty("validationStatus").ToString()); + Console.WriteLine(result[0].GetProperty("validationFailureDetails").ToString()); } } } diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestRunClient.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestRunClient.cs index 53f6e8a943fb..88f1db38d983 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestRunClient.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/Generated/Samples/Samples_LoadTestRunClient.cs @@ -7,11 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; +using Azure.Developer.LoadTesting; using Azure.Identity; using NUnit.Framework; @@ -23,9 +23,9 @@ public class Samples_LoadTestRunClient [Ignore("Only validating compilation of examples")] public void Example_GetTestRun() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetTestRun(""); @@ -37,42 +37,42 @@ public void Example_GetTestRun() [Ignore("Only validating compilation of examples")] public void Example_GetTestRun_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetTestRun(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -145,9 +145,9 @@ public void Example_GetTestRun_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestRun_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetTestRunAsync(""); @@ -159,42 +159,42 @@ public async Task Example_GetTestRun_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestRun_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetTestRunAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -267,9 +267,9 @@ public async Task Example_GetTestRun_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteTestRun() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.DeleteTestRun(""); Console.WriteLine(response.Status); @@ -279,9 +279,9 @@ public void Example_DeleteTestRun() [Ignore("Only validating compilation of examples")] public void Example_DeleteTestRun_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.DeleteTestRun(""); Console.WriteLine(response.Status); @@ -291,9 +291,9 @@ public void Example_DeleteTestRun_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTestRun_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.DeleteTestRunAsync(""); Console.WriteLine(response.Status); @@ -303,9 +303,9 @@ public async Task Example_DeleteTestRun_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTestRun_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.DeleteTestRunAsync(""); Console.WriteLine(response.Status); @@ -315,9 +315,9 @@ public async Task Example_DeleteTestRun_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTestRunFile() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetTestRunFile("", ""); @@ -329,9 +329,9 @@ public void Example_GetTestRunFile() [Ignore("Only validating compilation of examples")] public void Example_GetTestRunFile_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetTestRunFile("", ""); @@ -348,9 +348,9 @@ public void Example_GetTestRunFile_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestRunFile_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetTestRunFileAsync("", ""); @@ -362,9 +362,9 @@ public async Task Example_GetTestRunFile_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTestRunFile_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetTestRunFileAsync("", ""); @@ -381,9 +381,9 @@ public async Task Example_GetTestRunFile_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_StopTestRun() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.StopTestRun(""); @@ -395,42 +395,42 @@ public void Example_StopTestRun() [Ignore("Only validating compilation of examples")] public void Example_StopTestRun_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.StopTestRun(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -503,9 +503,9 @@ public void Example_StopTestRun_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_StopTestRun_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.StopTestRunAsync(""); @@ -517,42 +517,42 @@ public async Task Example_StopTestRun_Async() [Ignore("Only validating compilation of examples")] public async Task Example_StopTestRun_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.StopTestRunAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); - Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("clientMetric").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("aggregate").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("condition").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("requestName").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("action").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("actualValue").ToString()); + Console.WriteLine(result.GetProperty("passFailCriteria").GetProperty("passFailMetrics").GetProperty("").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("secrets").GetProperty("").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("value").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("certificate").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("environmentVariables").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("errorDetails")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); - Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("transaction").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sampleCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorCount").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("errorPct").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("meanResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("medianResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("maxResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("minResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct1ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct2ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("pct3ResTime").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("throughput").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("receivedKBytesPerSec").ToString()); + Console.WriteLine(result.GetProperty("testRunStatistics").GetProperty("").GetProperty("sentKBytesPerSec").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("engineInstances").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("splitAllCSVs").ToString()); Console.WriteLine(result.GetProperty("loadTestConfiguration").GetProperty("quickStartTest").ToString()); @@ -625,9 +625,9 @@ public async Task Example_StopTestRun_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetMetricNamespaces() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetMetricNamespaces(""); @@ -639,9 +639,9 @@ public void Example_GetMetricNamespaces() [Ignore("Only validating compilation of examples")] public void Example_GetMetricNamespaces_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetMetricNamespaces(""); @@ -654,9 +654,9 @@ public void Example_GetMetricNamespaces_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetricNamespaces_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetMetricNamespacesAsync(""); @@ -668,9 +668,9 @@ public async Task Example_GetMetricNamespaces_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetricNamespaces_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetMetricNamespacesAsync(""); @@ -683,9 +683,9 @@ public async Task Example_GetMetricNamespaces_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetMetricDefinitions() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetMetricDefinitions("", ""); @@ -697,9 +697,9 @@ public void Example_GetMetricDefinitions() [Ignore("Only validating compilation of examples")] public void Example_GetMetricDefinitions_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetMetricDefinitions("", ""); @@ -719,9 +719,9 @@ public void Example_GetMetricDefinitions_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetricDefinitions_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetMetricDefinitionsAsync("", ""); @@ -733,9 +733,9 @@ public async Task Example_GetMetricDefinitions_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetricDefinitions_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetMetricDefinitionsAsync("", ""); @@ -755,56 +755,54 @@ public async Task Example_GetMetricDefinitions_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateAppComponents() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = client.CreateOrUpdateAppComponents("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateAppComponents("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateAppComponents_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", }, }, - }; - - Response response = client.CreateOrUpdateAppComponents("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateAppComponents("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -816,56 +814,54 @@ public void Example_CreateOrUpdateAppComponents_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateAppComponents_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - }; - - Response response = await client.CreateOrUpdateAppComponentsAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAppComponentsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateAppComponents_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - components = new + ["components"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceName = "", - resourceType = "", - displayName = "", - kind = "", + ["resourceName"] = "", + ["resourceType"] = "", + ["displayName"] = "", + ["kind"] = "", }, }, - }; - - Response response = await client.CreateOrUpdateAppComponentsAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAppComponentsAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -877,34 +873,34 @@ public async Task Example_CreateOrUpdateAppComponents_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAppComponents() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetAppComponents(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetAppComponents_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetAppComponents(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -916,34 +912,34 @@ public void Example_GetAppComponents_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAppComponents_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetAppComponentsAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetAppComponents_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetAppComponentsAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); - Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("resourceGroup").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("components").GetProperty("").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("testRunId").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); @@ -955,13 +951,12 @@ public async Task Example_GetAppComponents_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateServerMetricsConfig() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -971,39 +966,38 @@ public void Example_CreateOrUpdateServerMetricsConfig() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateServerMetricsConfig_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - metrics = new + ["metrics"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, - }; - - Response response = client.CreateOrUpdateServerMetricsConfig("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateServerMetricsConfig("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -1014,13 +1008,12 @@ public void Example_CreateOrUpdateServerMetricsConfig_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateServerMetricsConfig_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new { }; - - Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1030,39 +1023,38 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateServerMetricsConfig_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - metrics = new + ["metrics"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - resourceId = "", - metricNamespace = "", - displayDescription = "", - name = "", - aggregation = "", - unit = "", - resourceType = "", + ["resourceId"] = "", + ["metricNamespace"] = "", + ["displayDescription"] = "", + ["name"] = "", + ["aggregation"] = "", + ["unit"] = "", + ["resourceType"] = "", }, }, - }; - - Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateServerMetricsConfigAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -1073,9 +1065,9 @@ public async Task Example_CreateOrUpdateServerMetricsConfig_AllParameters_Async( [Ignore("Only validating compilation of examples")] public void Example_GetServerMetricsConfig() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetServerMetricsConfig(""); @@ -1087,22 +1079,22 @@ public void Example_GetServerMetricsConfig() [Ignore("Only validating compilation of examples")] public void Example_GetServerMetricsConfig_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = client.GetServerMetricsConfig(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -1113,9 +1105,9 @@ public void Example_GetServerMetricsConfig_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetServerMetricsConfig_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetServerMetricsConfigAsync(""); @@ -1127,22 +1119,22 @@ public async Task Example_GetServerMetricsConfig_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetServerMetricsConfig_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); Response response = await client.GetServerMetricsConfigAsync(""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("testRunId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); - Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("metricNamespace").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("displayDescription").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("aggregation").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("unit").ToString()); + Console.WriteLine(result.GetProperty("metrics").GetProperty("").GetProperty("resourceType").ToString()); Console.WriteLine(result.GetProperty("createdDateTime").ToString()); Console.WriteLine(result.GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); @@ -1153,16 +1145,15 @@ public async Task Example_GetServerMetricsConfig_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetMetrics() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - foreach (var item in client.GetMetrics("", "", "", "", RequestContent.Create(data))) + RequestContent content = null; + foreach (BinaryData item in client.GetMetrics("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1170,29 +1161,31 @@ public void Example_GetMetrics() [Ignore("Only validating compilation of examples")] public void Example_GetMetrics_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - filters = new[] { - new { - name = "", - values = new[] { - "" - }, - } - }, - }; - - foreach (var item in client.GetMetrics("", "", "", "", RequestContent.Create(data), "", "")) + ["filters"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["values"] = new List() +{ +"" +}, +} +}, + }); + foreach (BinaryData item in client.GetMetrics("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("data")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("data")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("timestamp").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("value").ToString()); } } @@ -1200,16 +1193,15 @@ public void Example_GetMetrics_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetrics_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - await foreach (var item in client.GetMetricsAsync("", "", "", "", RequestContent.Create(data))) + RequestContent content = null; + await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1217,29 +1209,31 @@ public async Task Example_GetMetrics_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetrics_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - filters = new[] { - new { - name = "", - values = new[] { - "" - }, - } - }, - }; - - await foreach (var item in client.GetMetricsAsync("", "", "", "", RequestContent.Create(data), "", "")) + ["filters"] = new List() +{ +new Dictionary() +{ +["name"] = "", +["values"] = new List() +{ +"" +}, +} +}, + }); + await foreach (BinaryData item in client.GetMetricsAsync("", "", "", "", content, aggregation: "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("data")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("data")[0].GetProperty("value").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("dimensionValues")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("timestamp").ToString()); + Console.WriteLine(result[0].GetProperty("data")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("dimensionValues")[0].GetProperty("value").ToString()); } } @@ -1247,14 +1241,14 @@ public async Task Example_GetMetrics_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetMetricDimensionValues() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - foreach (var item in client.GetMetricDimensionValues("", "", "", "", "")) + foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1262,14 +1256,14 @@ public void Example_GetMetricDimensionValues() [Ignore("Only validating compilation of examples")] public void Example_GetMetricDimensionValues_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - foreach (var item in client.GetMetricDimensionValues("", "", "", "", "", "")) + foreach (BinaryData item in client.GetMetricDimensionValues("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1277,14 +1271,14 @@ public void Example_GetMetricDimensionValues_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetricDimensionValues_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - await foreach (var item in client.GetMetricDimensionValuesAsync("", "", "", "", "")) + await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -1292,14 +1286,14 @@ public async Task Example_GetMetricDimensionValues_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetricDimensionValues_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LoadTestRunClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LoadTestRunClient client = new LoadTestRunClient(endpoint, credential); - await foreach (var item in client.GetMetricDimensionValuesAsync("", "", "", "", "", "")) + await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("", "", "", "", "", interval: "PT5S")) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } } diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml index a4cc5a13fbd5..cef088512d39 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml +++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml @@ -2,64 +2,62 @@ - -This sample shows how to call UploadAsync with required parameters and request content. + +This sample shows how to call UploadAsync. "); -var client = new LogsIngestionClient(endpoint, credential); - -var data = new[] { - new {} -}; - -Response response = await client.UploadAsync("", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.UploadAsync("", "", content); Console.WriteLine(response.Status); ]]> This sample shows how to call UploadAsync with all parameters and request content. "); -var client = new LogsIngestionClient(endpoint, credential); - -var data = new[] { - new {} -}; - -Response response = await client.UploadAsync("", "", RequestContent.Create(data), ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.UploadAsync("", "", content, contentEncoding: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call Upload with required parameters and request content. + +This sample shows how to call Upload. "); -var client = new LogsIngestionClient(endpoint, credential); - -var data = new[] { - new {} -}; - -Response response = client.Upload("", "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.Upload("", "", content); Console.WriteLine(response.Status); ]]> This sample shows how to call Upload with all parameters and request content. "); -var client = new LogsIngestionClient(endpoint, credential); - -var data = new[] { - new {} -}; - -Response response = client.Upload("", "", RequestContent.Create(data), ""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.Upload("", "", content, contentEncoding: ""); Console.WriteLine(response.Status); -]]> - +]]> \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Ingestion/tests/Generated/Samples/Samples_LogsIngestionClient.cs b/sdk/monitor/Azure.Monitor.Ingestion/tests/Generated/Samples/Samples_LogsIngestionClient.cs index b0e0139c4b8f..87d799ecd305 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/tests/Generated/Samples/Samples_LogsIngestionClient.cs +++ b/sdk/monitor/Azure.Monitor.Ingestion/tests/Generated/Samples/Samples_LogsIngestionClient.cs @@ -7,12 +7,11 @@ using System; using System.Collections.Generic; -using System.IO; -using System.Text.Json; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.Identity; +using Azure.Monitor.Ingestion; using NUnit.Framework; namespace Azure.Monitor.Ingestion.Samples @@ -23,15 +22,15 @@ public class Samples_LogsIngestionClient [Ignore("Only validating compilation of examples")] public void Example_Upload() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LogsIngestionClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - var data = new[] { - new {} -}; - - Response response = client.Upload("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.Upload("", "", content); Console.WriteLine(response.Status); } @@ -39,15 +38,15 @@ public void Example_Upload() [Ignore("Only validating compilation of examples")] public void Example_Upload_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LogsIngestionClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - var data = new[] { - new {} -}; - - Response response = client.Upload("", "", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.Upload("", "", content, contentEncoding: ""); Console.WriteLine(response.Status); } @@ -55,15 +54,15 @@ public void Example_Upload_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Upload_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LogsIngestionClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - var data = new[] { - new {} -}; - - Response response = await client.UploadAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.UploadAsync("", "", content); Console.WriteLine(response.Status); } @@ -71,15 +70,15 @@ public async Task Example_Upload_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Upload_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new LogsIngestionClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + LogsIngestionClient client = new LogsIngestionClient(endpoint, credential); - var data = new[] { - new {} -}; - - Response response = await client.UploadAsync("", "", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.UploadAsync("", "", content, contentEncoding: ""); Console.WriteLine(response.Status); } } diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/Docs/OpenAIClient.xml b/sdk/openai/Azure.AI.OpenAI/src/Generated/Docs/OpenAIClient.xml index 5e9ad80022d6..da1d5e0cd4c3 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Generated/Docs/OpenAIClient.xml +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/Docs/OpenAIClient.xml @@ -1,131 +1,25 @@ - - -This sample shows how to call GetEmbeddingsAsync with required parameters. -"); - -var embeddingsOptions = new EmbeddingsOptions(new string[] -{ - "" -}) -{ - User = "", -}; -var result = await client.GetEmbeddingsAsync("", embeddingsOptions); -]]> - - - - -This sample shows how to call GetEmbeddings with required parameters. -"); - -var embeddingsOptions = new EmbeddingsOptions(new string[] -{ - "" -}) -{ - User = "", -}; -var result = client.GetEmbeddings("", embeddingsOptions); -]]> - - - - - - - - -This sample shows how to call GetCompletionsAsync with required parameters. -"); - -var completionsOptions = new CompletionsOptions(new string[] -{ - "" -}) -{ - MaxTokens = 1234, - Temperature = 3.14f, - NucleusSamplingFactor = 3.14f, - User = "", - ChoicesPerPrompt = 1234, - LogProbabilityCount = 1234, - Echo = true, - StopSequences = -{ - "" - }, - PresencePenalty = 3.14f, - FrequencyPenalty = 3.14f, - GenerationSampleCount = 1234, -}; -var result = await client.GetCompletionsAsync("", completionsOptions); -]]> - - - - -This sample shows how to call GetCompletions with required parameters. -"); - -var completionsOptions = new CompletionsOptions(new string[] -{ - "" -}) -{ - MaxTokens = 1234, - Temperature = 3.14f, - NucleusSamplingFactor = 3.14f, - User = "", - ChoicesPerPrompt = 1234, - LogProbabilityCount = 1234, - Echo = true, - StopSequences = -{ - "" - }, - PresencePenalty = 3.14f, - FrequencyPenalty = 3.14f, - GenerationSampleCount = 1234, -}; -var result = client.GetCompletions("", completionsOptions); -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Generated/Samples/Samples_OpenAIClient.cs b/sdk/openai/Azure.AI.OpenAI/tests/Generated/Samples/Samples_OpenAIClient.cs index 461671ba7684..78a83161a2ad 100644 --- a/sdk/openai/Azure.AI.OpenAI/tests/Generated/Samples/Samples_OpenAIClient.cs +++ b/sdk/openai/Azure.AI.OpenAI/tests/Generated/Samples/Samples_OpenAIClient.cs @@ -5,63 +5,11 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using System.Threading.Tasks; -using Azure; -using Azure.Core; using Azure.Identity; -using NUnit.Framework; namespace Azure.AI.OpenAI.Samples { public class Samples_OpenAIClient { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetEmbeddings_Convenience_Async() - { - var client = new OpenAIClient(""); - - var embeddingsOptions = new EmbeddingsOptions(new string[] - { - "" - }) - { - User = "", - }; - var result = await client.GetEmbeddingsAsync("", embeddingsOptions); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetCompletions_Convenience_Async() - { - var client = new OpenAIClient(""); - - var completionsOptions = new CompletionsOptions(new string[] - { - "" - }) - { - MaxTokens = 1234, - Temperature = 3.14f, - NucleusSamplingFactor = 3.14f, - User = "", - ChoicesPerPrompt = 1234, - LogProbabilityCount = 1234, - Echo = true, - StopSequences = -{ - "" - }, - PresencePenalty = 3.14f, - FrequencyPenalty = 3.14f, - GenerationSampleCount = 1234, - }; - var result = await client.GetCompletionsAsync("", completionsOptions); - } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewAccountClient.xml b/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewAccountClient.xml index 1426615fbe14..7f35d5f27468 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewAccountClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewAccountClient.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetAccountPropertiesAsync with required parameters and parse the result. + +This sample shows how to call GetAccountPropertiesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.GetAccountPropertiesAsync(new RequestContext()); +Response response = await client.GetAccountPropertiesAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccountPropertiesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = await client.GetAccountPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -48,20 +59,30 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - -This sample shows how to call GetAccountProperties with required parameters and parse the result. + +This sample shows how to call GetAccountProperties and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = client.GetAccountProperties(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccountProperties with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.GetAccountProperties(new RequestContext()); +Response response = client.GetAccountProperties(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -100,37 +121,35 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - + This sample shows how to call UpdateAccountPropertiesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateAccountPropertiesAsync with all request content, and how to parse the result. +This sample shows how to call UpdateAccountPropertiesAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - friendlyName = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -169,37 +188,35 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - + This sample shows how to call UpdateAccountProperties and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = client.UpdateAccountProperties(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateAccountProperties with all request content, and how to parse the result. +This sample shows how to call UpdateAccountProperties with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - friendlyName = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.UpdateAccountProperties(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -238,362 +255,421 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - -This sample shows how to call GetAccessKeysAsync with required parameters and parse the result. + +This sample shows how to call GetAccessKeysAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = await client.GetAccessKeysAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccessKeysAsync with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.GetAccessKeysAsync(new RequestContext()); +Response response = await client.GetAccessKeysAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - -This sample shows how to call GetAccessKeys with required parameters and parse the result. + +This sample shows how to call GetAccessKeys and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = client.GetAccessKeys(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccessKeys with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.GetAccessKeys(new RequestContext()); +Response response = client.GetAccessKeys(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - + This sample shows how to call RegenerateAccessKeyAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call RegenerateAccessKeyAsync with all request content, and how to parse the result. +This sample shows how to call RegenerateAccessKeyAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - keyType = "PrimaryAtlasKafkaKey", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keyType"] = "PrimaryAtlasKafkaKey", +}); +Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - + This sample shows how to call RegenerateAccessKey and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = client.RegenerateAccessKey(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call RegenerateAccessKey with all request content, and how to parse the result. +This sample shows how to call RegenerateAccessKey with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - keyType = "PrimaryAtlasKafkaKey", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.RegenerateAccessKey(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keyType"] = "PrimaryAtlasKafkaKey", +}); +Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - -This sample shows how to call GetCollectionsAsync with required parameters and parse the result. + +This sample shows how to call GetCollectionsAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -await foreach (var item in client.GetCollectionsAsync("", new RequestContext())) +await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCollectionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +await foreach (BinaryData item in client.GetCollectionsAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); +} +]]> - -This sample shows how to call GetCollections with required parameters and parse the result. + +This sample shows how to call GetCollections and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -foreach (var item in client.GetCollections("", new RequestContext())) +foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCollections with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +foreach (BinaryData item in client.GetCollections("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); +} +]]> - -This sample shows how to call GetResourceSetRulesAsync with required parameters and parse the result. + +This sample shows how to call GetResourceSetRulesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -await foreach (var item in client.GetResourceSetRulesAsync("", new RequestContext())) +await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetResourceSetRulesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +await foreach (BinaryData item in client.GetResourceSetRulesAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); +} +]]> - -This sample shows how to call GetResourceSetRules with required parameters and parse the result. + +This sample shows how to call GetResourceSetRules and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -foreach (var item in client.GetResourceSetRules("", new RequestContext())) +foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetResourceSetRules with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +foreach (BinaryData item in client.GetResourceSetRules("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewCollection.xml b/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewCollection.xml index 74242221269f..49a11ca43bbb 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewCollection.xml +++ b/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewCollection.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetCollectionAsync with required parameters and parse the result. + +This sample shows how to call GetCollectionAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = await client.GetCollectionAsync(new RequestContext()); +Response response = await client.GetCollectionAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollectionAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = await client.GetCollectionAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -24,18 +35,28 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - -This sample shows how to call GetCollection with required parameters and parse the result. + +This sample shows how to call GetCollection and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = client.GetCollection(new RequestContext()); +Response response = client.GetCollection(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollection with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = client.GetCollection(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -50,39 +71,38 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateCollectionAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new {}; - -Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateCollectionAsync with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateCollectionAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new { - description = "", - friendlyName = "", - parentCollection = new { - referenceName = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() + { + ["referenceName"] = "", }, -}; - -Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -97,39 +117,38 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateCollection and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new {}; - -Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateCollection with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateCollection with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new { - description = "", - friendlyName = "", - parentCollection = new { - referenceName = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() + { + ["referenceName"] = "", }, -}; - -Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -144,100 +163,157 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - + This sample shows how to call DeleteCollectionAsync. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteCollectionAsync with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = await client.DeleteCollectionAsync(); +Console.WriteLine(response.Status); +]]> - + This sample shows how to call DeleteCollection. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteCollection with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = client.DeleteCollection(); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCollectionPathAsync with required parameters and parse the result. + +This sample shows how to call GetCollectionPathAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = await client.GetCollectionPathAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollectionPathAsync with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = await client.GetCollectionPathAsync(new RequestContext()); +Response response = await client.GetCollectionPathAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); Console.WriteLine(result.GetProperty("parentNameChain")[0].ToString()); -]]> - +]]> - -This sample shows how to call GetCollectionPath with required parameters and parse the result. + +This sample shows how to call GetCollectionPath and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = client.GetCollectionPath(new RequestContext()); +Response response = client.GetCollectionPath(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollectionPath with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = client.GetCollectionPath(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); Console.WriteLine(result.GetProperty("parentNameChain")[0].ToString()); -]]> - +]]> - -This sample shows how to call GetChildCollectionNamesAsync with required parameters and parse the result. + +This sample shows how to call GetChildCollectionNamesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -await foreach (var item in client.GetChildCollectionNamesAsync("", new RequestContext())) +await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetChildCollectionNamesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +await foreach (BinaryData item in client.GetChildCollectionNamesAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); +} +]]> - -This sample shows how to call GetChildCollectionNames with required parameters and parse the result. + +This sample shows how to call GetChildCollectionNames and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -foreach (var item in client.GetChildCollectionNames("", new RequestContext())) +foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetChildCollectionNames with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +foreach (BinaryData item in client.GetChildCollectionNames("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewResourceSetRule.xml b/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewResourceSetRule.xml index c41035842cca..c8aa9ca1f6db 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewResourceSetRule.xml +++ b/sdk/purview/Azure.Analytics.Purview.Account/src/Generated/Docs/PurviewResourceSetRule.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetResourceSetRuleAsync with required parameters and parse the result. + +This sample shows how to call GetResourceSetRuleAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -Response response = await client.GetResourceSetRuleAsync(new RequestContext()); +Response response = await client.GetResourceSetRuleAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetResourceSetRuleAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = await client.GetResourceSetRuleAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -97,18 +108,28 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - -This sample shows how to call GetResourceSetRule with required parameters and parse the result. + +This sample shows how to call GetResourceSetRule and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -Response response = client.GetResourceSetRule(new RequestContext()); +Response response = client.GetResourceSetRule(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetResourceSetRule with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = client.GetResourceSetRule(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -196,158 +217,144 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateResourceSetRuleAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -var data = new {}; - -Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateResourceSetRuleAsync with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateResourceSetRuleAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -var data = new { - advancedResourceSet = new { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["advancedResourceSet"] = new Dictionary() + { + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["pathPatternConfig"] = new Dictionary() + { + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, -}; - -Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -435,158 +442,144 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateResourceSetRule and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateResourceSetRule with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateResourceSetRule with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -var data = new { - advancedResourceSet = new { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["advancedResourceSet"] = new Dictionary() + { + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["pathPatternConfig"] = new Dictionary() + { + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, -}; - -Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -674,34 +667,49 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - + This sample shows how to call DeleteResourceSetRuleAsync. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteResourceSetRuleAsync with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = await client.DeleteResourceSetRuleAsync(); +Console.WriteLine(response.Status); +]]> - + This sample shows how to call DeleteResourceSetRule. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteResourceSetRule with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = client.DeleteResourceSetRule(); +Console.WriteLine(response.Status); +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewAccountClient.cs b/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewAccountClient.cs index fbde2ce5c17e..5bace3695f81 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewAccountClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewAccountClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Account; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ public class Samples_PurviewAccountClient [Ignore("Only validating compilation of examples")] public void Example_GetAccountProperties() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccountProperties(new RequestContext()); + Response response = client.GetAccountProperties(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +37,11 @@ public void Example_GetAccountProperties() [Ignore("Only validating compilation of examples")] public void Example_GetAccountProperties_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccountProperties(new RequestContext()); + Response response = client.GetAccountProperties(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -80,7 +80,7 @@ public void Example_GetAccountProperties_AllParameters() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -88,11 +88,11 @@ public void Example_GetAccountProperties_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccountProperties_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccountPropertiesAsync(new RequestContext()); + Response response = await client.GetAccountPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -102,11 +102,11 @@ public async Task Example_GetAccountProperties_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccountProperties_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccountPropertiesAsync(new RequestContext()); + Response response = await client.GetAccountPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -145,7 +145,7 @@ public async Task Example_GetAccountProperties_AllParameters_Async() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -153,13 +153,12 @@ public async Task Example_GetAccountProperties_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateAccountProperties() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = client.UpdateAccountProperties(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -169,16 +168,15 @@ public void Example_UpdateAccountProperties() [Ignore("Only validating compilation of examples")] public void Example_UpdateAccountProperties_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = client.UpdateAccountProperties(RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -217,7 +215,7 @@ public void Example_UpdateAccountProperties_AllParameters() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -225,13 +223,12 @@ public void Example_UpdateAccountProperties_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateAccountProperties_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -241,16 +238,15 @@ public async Task Example_UpdateAccountProperties_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateAccountProperties_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -289,7 +285,7 @@ public async Task Example_UpdateAccountProperties_AllParameters_Async() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -297,11 +293,11 @@ public async Task Example_UpdateAccountProperties_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAccessKeys() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccessKeys(new RequestContext()); + Response response = client.GetAccessKeys(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -311,11 +307,11 @@ public void Example_GetAccessKeys() [Ignore("Only validating compilation of examples")] public void Example_GetAccessKeys_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccessKeys(new RequestContext()); + Response response = client.GetAccessKeys(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -326,11 +322,11 @@ public void Example_GetAccessKeys_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccessKeys_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccessKeysAsync(new RequestContext()); + Response response = await client.GetAccessKeysAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -340,11 +336,11 @@ public async Task Example_GetAccessKeys_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccessKeys_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccessKeysAsync(new RequestContext()); + Response response = await client.GetAccessKeysAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -355,13 +351,12 @@ public async Task Example_GetAccessKeys_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_RegenerateAccessKey() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = client.RegenerateAccessKey(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -371,16 +366,15 @@ public void Example_RegenerateAccessKey() [Ignore("Only validating compilation of examples")] public void Example_RegenerateAccessKey_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keyType = "PrimaryAtlasKafkaKey", - }; - - Response response = client.RegenerateAccessKey(RequestContent.Create(data)); + ["keyType"] = "PrimaryAtlasKafkaKey", + }); + Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -391,13 +385,12 @@ public void Example_RegenerateAccessKey_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_RegenerateAccessKey_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -407,16 +400,15 @@ public async Task Example_RegenerateAccessKey_Async() [Ignore("Only validating compilation of examples")] public async Task Example_RegenerateAccessKey_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keyType = "PrimaryAtlasKafkaKey", - }; - - Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); + ["keyType"] = "PrimaryAtlasKafkaKey", + }); + Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -427,14 +419,14 @@ public async Task Example_RegenerateAccessKey_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCollections() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetCollections("", new RequestContext())) + foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -442,25 +434,25 @@ public void Example_GetCollections() [Ignore("Only validating compilation of examples")] public void Example_GetCollections_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetCollections("", new RequestContext())) + foreach (BinaryData item in client.GetCollections("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); } } @@ -468,14 +460,14 @@ public void Example_GetCollections_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollections_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetCollectionsAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -483,25 +475,25 @@ public async Task Example_GetCollections_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollections_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetCollectionsAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetCollectionsAsync("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); } } @@ -509,14 +501,14 @@ public async Task Example_GetCollections_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRules() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetResourceSetRules("", new RequestContext())) + foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -524,98 +516,98 @@ public void Example_GetResourceSetRules() [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRules_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetResourceSetRules("", new RequestContext())) + foreach (BinaryData item in client.GetResourceSetRules("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); } } @@ -623,14 +615,14 @@ public void Example_GetResourceSetRules_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRules_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetResourceSetRulesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -638,98 +630,98 @@ public async Task Example_GetResourceSetRules_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRules_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetResourceSetRulesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetResourceSetRulesAsync("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewCollection.cs b/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewCollection.cs index 23ef85376125..5cf2fca23a00 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewCollection.cs +++ b/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewCollection.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Account; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ internal class Samples_PurviewCollection [Ignore("Only validating compilation of examples")] public void Example_GetCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollection(new RequestContext()); + Response response = client.GetCollection(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +37,11 @@ public void Example_GetCollection() [Ignore("Only validating compilation of examples")] public void Example_GetCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollection(new RequestContext()); + Response response = client.GetCollection(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -62,11 +62,11 @@ public void Example_GetCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionAsync(new RequestContext()); + Response response = await client.GetCollectionAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -76,11 +76,11 @@ public async Task Example_GetCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionAsync(new RequestContext()); + Response response = await client.GetCollectionAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -101,13 +101,12 @@ public async Task Example_GetCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new { }; - - Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -117,21 +116,20 @@ public void Example_CreateOrUpdateCollection() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - description = "", - friendlyName = "", - parentCollection = new + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() { - referenceName = "", + ["referenceName"] = "", }, - }; - - Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -152,13 +150,12 @@ public void Example_CreateOrUpdateCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new { }; - - Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -168,21 +165,20 @@ public async Task Example_CreateOrUpdateCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - description = "", - friendlyName = "", - parentCollection = new + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() { - referenceName = "", + ["referenceName"] = "", }, - }; - - Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -203,9 +199,9 @@ public async Task Example_CreateOrUpdateCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); Console.WriteLine(response.Status); @@ -215,9 +211,9 @@ public void Example_DeleteCollection() [Ignore("Only validating compilation of examples")] public void Example_DeleteCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); Console.WriteLine(response.Status); @@ -227,9 +223,9 @@ public void Example_DeleteCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); Console.WriteLine(response.Status); @@ -239,9 +235,9 @@ public async Task Example_DeleteCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); Console.WriteLine(response.Status); @@ -251,11 +247,11 @@ public async Task Example_DeleteCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCollectionPath() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollectionPath(new RequestContext()); + Response response = client.GetCollectionPath(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -265,11 +261,11 @@ public void Example_GetCollectionPath() [Ignore("Only validating compilation of examples")] public void Example_GetCollectionPath_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollectionPath(new RequestContext()); + Response response = client.GetCollectionPath(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); @@ -280,11 +276,11 @@ public void Example_GetCollectionPath_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollectionPath_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionPathAsync(new RequestContext()); + Response response = await client.GetCollectionPathAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -294,11 +290,11 @@ public async Task Example_GetCollectionPath_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollectionPath_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionPathAsync(new RequestContext()); + Response response = await client.GetCollectionPathAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); @@ -309,14 +305,14 @@ public async Task Example_GetCollectionPath_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetChildCollectionNames() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - foreach (var item in client.GetChildCollectionNames("", new RequestContext())) + foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -324,15 +320,15 @@ public void Example_GetChildCollectionNames() [Ignore("Only validating compilation of examples")] public void Example_GetChildCollectionNames_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - foreach (var item in client.GetChildCollectionNames("", new RequestContext())) + foreach (BinaryData item in client.GetChildCollectionNames("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); } } @@ -340,14 +336,14 @@ public void Example_GetChildCollectionNames_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetChildCollectionNames_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - await foreach (var item in client.GetChildCollectionNamesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -355,15 +351,15 @@ public async Task Example_GetChildCollectionNames_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetChildCollectionNames_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - await foreach (var item in client.GetChildCollectionNamesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetChildCollectionNamesAsync("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs b/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs index 0b2e722f27d9..bf2156db8a7f 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs +++ b/sdk/purview/Azure.Analytics.Purview.Account/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Account; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ internal class Samples_PurviewResourceSetRule [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRule() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = client.GetResourceSetRule(new RequestContext()); + Response response = client.GetResourceSetRule(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +37,11 @@ public void Example_GetResourceSetRule() [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRule_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = client.GetResourceSetRule(new RequestContext()); + Response response = client.GetResourceSetRule(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -135,11 +135,11 @@ public void Example_GetResourceSetRule_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRule_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = await client.GetResourceSetRuleAsync(new RequestContext()); + Response response = await client.GetResourceSetRuleAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -149,11 +149,11 @@ public async Task Example_GetResourceSetRule_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRule_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = await client.GetResourceSetRuleAsync(new RequestContext()); + Response response = await client.GetResourceSetRuleAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -247,13 +247,12 @@ public async Task Example_GetResourceSetRule_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateResourceSetRule() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new { }; - - Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -263,141 +262,126 @@ public void Example_CreateOrUpdateResourceSetRule() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateResourceSetRule_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - advancedResourceSet = new + ["advancedResourceSet"] = new Dictionary() { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new + ["pathPatternConfig"] = new Dictionary() { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, - }; - - Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -491,13 +475,12 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateResourceSetRule_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new { }; - - Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -507,141 +490,126 @@ public async Task Example_CreateOrUpdateResourceSetRule_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - advancedResourceSet = new + ["advancedResourceSet"] = new Dictionary() { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new + ["pathPatternConfig"] = new Dictionary() { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, - }; - - Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -735,9 +703,9 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteResourceSetRule() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); Console.WriteLine(response.Status); @@ -747,9 +715,9 @@ public void Example_DeleteResourceSetRule() [Ignore("Only validating compilation of examples")] public void Example_DeleteResourceSetRule_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); Console.WriteLine(response.Status); @@ -759,9 +727,9 @@ public void Example_DeleteResourceSetRule_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteResourceSetRule_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); Console.WriteLine(response.Status); @@ -771,9 +739,9 @@ public async Task Example_DeleteResourceSetRule_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteResourceSetRule_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); Console.WriteLine(response.Status); diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewAccountClient.xml b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewAccountClient.xml index 1426615fbe14..7f35d5f27468 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewAccountClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewAccountClient.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetAccountPropertiesAsync with required parameters and parse the result. + +This sample shows how to call GetAccountPropertiesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.GetAccountPropertiesAsync(new RequestContext()); +Response response = await client.GetAccountPropertiesAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccountPropertiesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = await client.GetAccountPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -48,20 +59,30 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - -This sample shows how to call GetAccountProperties with required parameters and parse the result. + +This sample shows how to call GetAccountProperties and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = client.GetAccountProperties(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccountProperties with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.GetAccountProperties(new RequestContext()); +Response response = client.GetAccountProperties(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -100,37 +121,35 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - + This sample shows how to call UpdateAccountPropertiesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateAccountPropertiesAsync with all request content, and how to parse the result. +This sample shows how to call UpdateAccountPropertiesAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - friendlyName = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -169,37 +188,35 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - + This sample shows how to call UpdateAccountProperties and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = client.UpdateAccountProperties(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateAccountProperties with all request content, and how to parse the result. +This sample shows how to call UpdateAccountProperties with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - friendlyName = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.UpdateAccountProperties(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["friendlyName"] = "", +}); +Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -238,362 +255,421 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); -]]> - +]]> - -This sample shows how to call GetAccessKeysAsync with required parameters and parse the result. + +This sample shows how to call GetAccessKeysAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = await client.GetAccessKeysAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccessKeysAsync with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.GetAccessKeysAsync(new RequestContext()); +Response response = await client.GetAccessKeysAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - -This sample shows how to call GetAccessKeys with required parameters and parse the result. + +This sample shows how to call GetAccessKeys and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +Response response = client.GetAccessKeys(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAccessKeys with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.GetAccessKeys(new RequestContext()); +Response response = client.GetAccessKeys(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - + This sample shows how to call RegenerateAccessKeyAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call RegenerateAccessKeyAsync with all request content, and how to parse the result. +This sample shows how to call RegenerateAccessKeyAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - keyType = "PrimaryAtlasKafkaKey", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keyType"] = "PrimaryAtlasKafkaKey", +}); +Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - + This sample shows how to call RegenerateAccessKey and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -var data = new {}; - -Response response = client.RegenerateAccessKey(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call RegenerateAccessKey with all request content, and how to parse the result. +This sample shows how to call RegenerateAccessKey with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); - -var data = new { - keyType = "PrimaryAtlasKafkaKey", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -Response response = client.RegenerateAccessKey(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keyType"] = "PrimaryAtlasKafkaKey", +}); +Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); Console.WriteLine(result.GetProperty("atlasKafkaSecondaryEndpoint").ToString()); -]]> - +]]> - -This sample shows how to call GetCollectionsAsync with required parameters and parse the result. + +This sample shows how to call GetCollectionsAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -await foreach (var item in client.GetCollectionsAsync("", new RequestContext())) +await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCollectionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +await foreach (BinaryData item in client.GetCollectionsAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); +} +]]> - -This sample shows how to call GetCollections with required parameters and parse the result. + +This sample shows how to call GetCollections and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -foreach (var item in client.GetCollections("", new RequestContext())) +foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetCollections with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +foreach (BinaryData item in client.GetCollections("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); +} +]]> - -This sample shows how to call GetResourceSetRulesAsync with required parameters and parse the result. + +This sample shows how to call GetResourceSetRulesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -await foreach (var item in client.GetResourceSetRulesAsync("", new RequestContext())) +await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetResourceSetRulesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +await foreach (BinaryData item in client.GetResourceSetRulesAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); +} +]]> - -This sample shows how to call GetResourceSetRules with required parameters and parse the result. + +This sample shows how to call GetResourceSetRules and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); -foreach (var item in client.GetResourceSetRules("", new RequestContext())) +foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetResourceSetRules with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); + +foreach (BinaryData item in client.GetResourceSetRules("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewCollection.xml b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewCollection.xml index 74242221269f..49a11ca43bbb 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewCollection.xml +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewCollection.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetCollectionAsync with required parameters and parse the result. + +This sample shows how to call GetCollectionAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = await client.GetCollectionAsync(new RequestContext()); +Response response = await client.GetCollectionAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollectionAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = await client.GetCollectionAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -24,18 +35,28 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - -This sample shows how to call GetCollection with required parameters and parse the result. + +This sample shows how to call GetCollection and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = client.GetCollection(new RequestContext()); +Response response = client.GetCollection(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollection with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = client.GetCollection(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -50,39 +71,38 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateCollectionAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new {}; - -Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateCollectionAsync with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateCollectionAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new { - description = "", - friendlyName = "", - parentCollection = new { - referenceName = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() + { + ["referenceName"] = "", }, -}; - -Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -97,39 +117,38 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateCollection and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new {}; - -Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateCollection with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateCollection with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -var data = new { - description = "", - friendlyName = "", - parentCollection = new { - referenceName = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() + { + ["referenceName"] = "", }, -}; - -Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -144,100 +163,157 @@ Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType"). Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); -]]> - +]]> - + This sample shows how to call DeleteCollectionAsync. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteCollectionAsync with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = await client.DeleteCollectionAsync(); +Console.WriteLine(response.Status); +]]> - + This sample shows how to call DeleteCollection. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteCollection with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = client.DeleteCollection(); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetCollectionPathAsync with required parameters and parse the result. + +This sample shows how to call GetCollectionPathAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = await client.GetCollectionPathAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollectionPathAsync with all parameters and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = await client.GetCollectionPathAsync(new RequestContext()); +Response response = await client.GetCollectionPathAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); Console.WriteLine(result.GetProperty("parentNameChain")[0].ToString()); -]]> - +]]> - -This sample shows how to call GetCollectionPath with required parameters and parse the result. + +This sample shows how to call GetCollectionPath and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -Response response = client.GetCollectionPath(new RequestContext()); +Response response = client.GetCollectionPath(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCollectionPath with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +Response response = client.GetCollectionPath(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); Console.WriteLine(result.GetProperty("parentNameChain")[0].ToString()); -]]> - +]]> - -This sample shows how to call GetChildCollectionNamesAsync with required parameters and parse the result. + +This sample shows how to call GetChildCollectionNamesAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -await foreach (var item in client.GetChildCollectionNamesAsync("", new RequestContext())) +await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetChildCollectionNamesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +await foreach (BinaryData item in client.GetChildCollectionNamesAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); +} +]]> - -This sample shows how to call GetChildCollectionNames with required parameters and parse the result. + +This sample shows how to call GetChildCollectionNames and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); -foreach (var item in client.GetChildCollectionNames("", new RequestContext())) +foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].ToString()); } ]]> - +This sample shows how to call GetChildCollectionNames with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + +foreach (BinaryData item in client.GetChildCollectionNames("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataPolicyClient.xml b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataPolicyClient.xml index b9cd48ec0000..66ac29be1bae 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataPolicyClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataPolicyClient.xml @@ -2,81 +2,83 @@ - -This sample shows how to call UpdateMetadataPolicyAsync with required parameters and parse the result. + +This sample shows how to call UpdateMetadataPolicyAsync and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -var data = new {}; - -Response response = await client.UpdateMetadataPolicyAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.UpdateMetadataPolicyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateMetadataPolicyAsync with all parameters and request content, and how to parse the result. +This sample shows how to call UpdateMetadataPolicyAsync with all parameters and request content and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -var data = new { - name = "", - id = "", - version = 1234, - properties = new { - description = "", - decisionRules = new[] { - new { - effect = "Deny", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - attributeRules = new[] { - new { - id = "", - name = "", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - collection = new { - referenceName = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["name"] = "", + ["id"] = "", + ["version"] = 1234, + ["properties"] = new Dictionary() + { + ["description"] = "", + ["decisionRules"] = new List() +{ +new Dictionary() +{ +["effect"] = "Deny", +["dnfCondition"] = new List() +{ +new List() +{ +new Dictionary() +{ +["attributeName"] = "", +["attributeValueIncludes"] = "", +["attributeValueIncludedIn"] = new List() +{ +"" +}, +["attributeValueExcludes"] = "", +["attributeValueExcludedIn"] = new List() +{ +"" +}, +} +} +}, +} +}, + ["attributeRules"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["name"] = "", +["dnfCondition"] = new List() +{ +new List() +{ +null +} +}, +} +}, + ["collection"] = new Dictionary() + { + ["referenceName"] = "", }, - parentCollectionName = "", + ["parentCollectionName"] = "", }, -}; - -Response response = await client.UpdateMetadataPolicyAsync("", RequestContent.Create(data)); +}); +Response response = await client.UpdateMetadataPolicyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -101,85 +103,86 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules") Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); -]]> - +]]> - -This sample shows how to call UpdateMetadataPolicy with required parameters and parse the result. + +This sample shows how to call UpdateMetadataPolicy and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -Response response = client.UpdateMetadataPolicy("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.UpdateMetadataPolicy("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateMetadataPolicy with all parameters and request content, and how to parse the result. +This sample shows how to call UpdateMetadataPolicy with all parameters and request content and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -var data = new { - name = "", - id = "", - version = 1234, - properties = new { - description = "", - decisionRules = new[] { - new { - effect = "Deny", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - attributeRules = new[] { - new { - id = "", - name = "", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - collection = new { - referenceName = "", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["name"] = "", + ["id"] = "", + ["version"] = 1234, + ["properties"] = new Dictionary() + { + ["description"] = "", + ["decisionRules"] = new List() +{ +new Dictionary() +{ +["effect"] = "Deny", +["dnfCondition"] = new List() +{ +new List() +{ +new Dictionary() +{ +["attributeName"] = "", +["attributeValueIncludes"] = "", +["attributeValueIncludedIn"] = new List() +{ +"" +}, +["attributeValueExcludes"] = "", +["attributeValueExcludedIn"] = new List() +{ +"" +}, +} +} +}, +} +}, + ["attributeRules"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["name"] = "", +["dnfCondition"] = new List() +{ +new List() +{ +null +} +}, +} +}, + ["collection"] = new Dictionary() + { + ["referenceName"] = "", }, - parentCollectionName = "", + ["parentCollectionName"] = "", }, -}; - -Response response = client.UpdateMetadataPolicy("", RequestContent.Create(data)); +}); +Response response = client.UpdateMetadataPolicy("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -204,18 +207,28 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules") Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); -]]> - +]]> - -This sample shows how to call GetMetadataPolicyAsync with required parameters and parse the result. + +This sample shows how to call GetMetadataPolicyAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); + +Response response = await client.GetMetadataPolicyAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetMetadataPolicyAsync with all parameters and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -Response response = await client.GetMetadataPolicyAsync("", new RequestContext()); +Response response = await client.GetMetadataPolicyAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -240,18 +253,28 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules") Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); -]]> - +]]> - -This sample shows how to call GetMetadataPolicy with required parameters and parse the result. + +This sample shows how to call GetMetadataPolicy and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); + +Response response = client.GetMetadataPolicy("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetMetadataPolicy with all parameters and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); -Response response = client.GetMetadataPolicy("", new RequestContext()); +Response response = client.GetMetadataPolicy("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -276,36 +299,61 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("attributeRules") Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("collection").GetProperty("referenceName").ToString()); Console.WriteLine(result.GetProperty("properties").GetProperty("parentCollectionName").ToString()); -]]> - +]]> - -This sample shows how to call GetMetadataPoliciesAsync with required parameters and parse the result. + +This sample shows how to call GetMetadataPoliciesAsync and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); -await foreach (var item in client.GetMetadataPoliciesAsync(new RequestContext())) +await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } ]]> - +This sample shows how to call GetMetadataPoliciesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); + +await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> - -This sample shows how to call GetMetadataPolicies with required parameters and parse the result. + +This sample shows how to call GetMetadataPolicies and parse the result. "); -var client = new PurviewMetadataPolicyClient(endpoint, "", credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); -foreach (var item in client.GetMetadataPolicies(new RequestContext())) +foreach (BinaryData item in client.GetMetadataPolicies(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } ]]> - +This sample shows how to call GetMetadataPolicies with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); + +foreach (BinaryData item in client.GetMetadataPolicies(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataRolesClient.xml b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataRolesClient.xml index 4a0cd331b7a7..5d4c8020ab20 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataRolesClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewMetadataRolesClient.xml @@ -2,32 +2,58 @@ - -This sample shows how to call GetMetadataRolesAsync with required parameters and parse the result. + +This sample shows how to call GetMetadataRolesAsync and parse the result. "); -var client = new PurviewMetadataRolesClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); -await foreach (var item in client.GetMetadataRolesAsync(new RequestContext())) +await foreach (BinaryData item in client.GetMetadataRolesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } ]]> - +This sample shows how to call GetMetadataRolesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); + +await foreach (BinaryData item in client.GetMetadataRolesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> - -This sample shows how to call GetMetadataRoles with required parameters and parse the result. + +This sample shows how to call GetMetadataRoles and parse the result. "); -var client = new PurviewMetadataRolesClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); -foreach (var item in client.GetMetadataRoles(new RequestContext())) +foreach (BinaryData item in client.GetMetadataRoles(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } ]]> - +This sample shows how to call GetMetadataRoles with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); + +foreach (BinaryData item in client.GetMetadataRoles(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewResourceSetRule.xml b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewResourceSetRule.xml index c41035842cca..c8aa9ca1f6db 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewResourceSetRule.xml +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/Generated/Docs/PurviewResourceSetRule.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetResourceSetRuleAsync with required parameters and parse the result. + +This sample shows how to call GetResourceSetRuleAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -Response response = await client.GetResourceSetRuleAsync(new RequestContext()); +Response response = await client.GetResourceSetRuleAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetResourceSetRuleAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = await client.GetResourceSetRuleAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -97,18 +108,28 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - -This sample shows how to call GetResourceSetRule with required parameters and parse the result. + +This sample shows how to call GetResourceSetRule and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -Response response = client.GetResourceSetRule(new RequestContext()); +Response response = client.GetResourceSetRule(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetResourceSetRule with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = client.GetResourceSetRule(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -196,158 +217,144 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateResourceSetRuleAsync and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -var data = new {}; - -Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateResourceSetRuleAsync with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateResourceSetRuleAsync with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -var data = new { - advancedResourceSet = new { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["advancedResourceSet"] = new Dictionary() + { + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["pathPatternConfig"] = new Dictionary() + { + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, -}; - -Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -435,158 +442,144 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateResourceSetRule and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateResourceSetRule with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateResourceSetRule with all request content and parse the result. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); -var data = new { - advancedResourceSet = new { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["advancedResourceSet"] = new Dictionary() + { + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["pathPatternConfig"] = new Dictionary() + { + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, -}; - -Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -674,34 +667,49 @@ Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRul Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); -]]> - +]]> - + This sample shows how to call DeleteResourceSetRuleAsync. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteResourceSetRuleAsync with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = await client.DeleteResourceSetRuleAsync(); +Console.WriteLine(response.Status); +]]> - + This sample shows how to call DeleteResourceSetRule. "); -var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteResourceSetRule with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + +Response response = client.DeleteResourceSetRule(); +Console.WriteLine(response.Status); +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewAccountClient.cs b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewAccountClient.cs index 05cbc8eafee7..8bc9306ec227 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewAccountClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewAccountClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Administration; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ public class Samples_PurviewAccountClient [Ignore("Only validating compilation of examples")] public void Example_GetAccountProperties() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccountProperties(new RequestContext()); + Response response = client.GetAccountProperties(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +37,11 @@ public void Example_GetAccountProperties() [Ignore("Only validating compilation of examples")] public void Example_GetAccountProperties_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccountProperties(new RequestContext()); + Response response = client.GetAccountProperties(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -80,7 +80,7 @@ public void Example_GetAccountProperties_AllParameters() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -88,11 +88,11 @@ public void Example_GetAccountProperties_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccountProperties_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccountPropertiesAsync(new RequestContext()); + Response response = await client.GetAccountPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -102,11 +102,11 @@ public async Task Example_GetAccountProperties_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccountProperties_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccountPropertiesAsync(new RequestContext()); + Response response = await client.GetAccountPropertiesAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -145,7 +145,7 @@ public async Task Example_GetAccountProperties_AllParameters_Async() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -153,13 +153,12 @@ public async Task Example_GetAccountProperties_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateAccountProperties() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = client.UpdateAccountProperties(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -169,16 +168,15 @@ public void Example_UpdateAccountProperties() [Ignore("Only validating compilation of examples")] public void Example_UpdateAccountProperties_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = client.UpdateAccountProperties(RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = client.UpdateAccountProperties(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -217,7 +215,7 @@ public void Example_UpdateAccountProperties_AllParameters() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -225,13 +223,12 @@ public void Example_UpdateAccountProperties_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateAccountProperties_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -241,16 +238,15 @@ public async Task Example_UpdateAccountProperties_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateAccountProperties_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - friendlyName = "", - }; - - Response response = await client.UpdateAccountPropertiesAsync(RequestContent.Create(data)); + ["friendlyName"] = "", + }); + Response response = await client.UpdateAccountPropertiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -289,7 +285,7 @@ public async Task Example_UpdateAccountProperties_AllParameters_Async() Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); - Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("type").ToString()); } @@ -297,11 +293,11 @@ public async Task Example_UpdateAccountProperties_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetAccessKeys() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccessKeys(new RequestContext()); + Response response = client.GetAccessKeys(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -311,11 +307,11 @@ public void Example_GetAccessKeys() [Ignore("Only validating compilation of examples")] public void Example_GetAccessKeys_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = client.GetAccessKeys(new RequestContext()); + Response response = client.GetAccessKeys(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -326,11 +322,11 @@ public void Example_GetAccessKeys_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccessKeys_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccessKeysAsync(new RequestContext()); + Response response = await client.GetAccessKeysAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -340,11 +336,11 @@ public async Task Example_GetAccessKeys_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetAccessKeys_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - Response response = await client.GetAccessKeysAsync(new RequestContext()); + Response response = await client.GetAccessKeysAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -355,13 +351,12 @@ public async Task Example_GetAccessKeys_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_RegenerateAccessKey() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = client.RegenerateAccessKey(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -371,16 +366,15 @@ public void Example_RegenerateAccessKey() [Ignore("Only validating compilation of examples")] public void Example_RegenerateAccessKey_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keyType = "PrimaryAtlasKafkaKey", - }; - - Response response = client.RegenerateAccessKey(RequestContent.Create(data)); + ["keyType"] = "PrimaryAtlasKafkaKey", + }); + Response response = client.RegenerateAccessKey(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -391,13 +385,12 @@ public void Example_RegenerateAccessKey_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_RegenerateAccessKey_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new { }; - - Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -407,16 +400,15 @@ public async Task Example_RegenerateAccessKey_Async() [Ignore("Only validating compilation of examples")] public async Task Example_RegenerateAccessKey_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keyType = "PrimaryAtlasKafkaKey", - }; - - Response response = await client.RegenerateAccessKeyAsync(RequestContent.Create(data)); + ["keyType"] = "PrimaryAtlasKafkaKey", + }); + Response response = await client.RegenerateAccessKeyAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("atlasKafkaPrimaryEndpoint").ToString()); @@ -427,14 +419,14 @@ public async Task Example_RegenerateAccessKey_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCollections() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetCollections("", new RequestContext())) + foreach (BinaryData item in client.GetCollections(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -442,25 +434,25 @@ public void Example_GetCollections() [Ignore("Only validating compilation of examples")] public void Example_GetCollections_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetCollections("", new RequestContext())) + foreach (BinaryData item in client.GetCollections("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); } } @@ -468,14 +460,14 @@ public void Example_GetCollections_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollections_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetCollectionsAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetCollectionsAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -483,25 +475,25 @@ public async Task Example_GetCollections_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollections_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetCollectionsAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetCollectionsAsync("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("referenceName").ToString()); - Console.WriteLine(result.GetProperty("parentCollection").GetProperty("type").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("createdByType").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); - Console.WriteLine(result.GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); + Console.WriteLine(result[0].GetProperty("collectionProvisioningState").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("referenceName").ToString()); + Console.WriteLine(result[0].GetProperty("parentCollection").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("createdByType").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("systemData").GetProperty("lastModifiedByType").ToString()); } } @@ -509,14 +501,14 @@ public async Task Example_GetCollections_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRules() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetResourceSetRules("", new RequestContext())) + foreach (BinaryData item in client.GetResourceSetRules(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -524,98 +516,98 @@ public void Example_GetResourceSetRules() [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRules_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - foreach (var item in client.GetResourceSetRules("", new RequestContext())) + foreach (BinaryData item in client.GetResourceSetRules("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); } } @@ -623,14 +615,14 @@ public void Example_GetResourceSetRules_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRules_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetResourceSetRulesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetResourceSetRulesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -638,98 +630,98 @@ public async Task Example_GetResourceSetRules_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRules_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewAccountClient client = new PurviewAccountClient(endpoint, credential); - await foreach (var item in client.GetResourceSetRulesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetResourceSetRulesAsync("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); - Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); - Console.WriteLine(result.GetProperty("pathPatternConfig").GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); + Console.WriteLine(result[0].GetProperty("advancedResourceSet").GetProperty("resourceSetProcessing").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("acceptedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("complexReplacers")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("enableDefaultPatterns").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("dynamicReplacement").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("entityTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("normalizationRules")[0].GetProperty("version").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("condition").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disabled").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("disableRecursiveReplacerApplication").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("doNotReplaceRegex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("maxLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDashes").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigits").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDigitsOrLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minDots").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minHex").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minLetters").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("minUnderscores").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("options").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("regex").GetProperty("regexStr").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("regexReplacers")[0].GetProperty("replaceWith").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("filterType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("modifiedBy").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("rejectedPatterns")[0].GetProperty("path").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("bindingUrl").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("isResourceSet").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("lastUpdatedTimestamp").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("rules")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("scopedRules")[0].GetProperty("storeType").ToString()); + Console.WriteLine(result[0].GetProperty("pathPatternConfig").GetProperty("version").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewCollection.cs b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewCollection.cs index 3410b2312313..2c72a0523049 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewCollection.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewCollection.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Administration; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ internal class Samples_PurviewCollection [Ignore("Only validating compilation of examples")] public void Example_GetCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollection(new RequestContext()); + Response response = client.GetCollection(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +37,11 @@ public void Example_GetCollection() [Ignore("Only validating compilation of examples")] public void Example_GetCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollection(new RequestContext()); + Response response = client.GetCollection(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -62,11 +62,11 @@ public void Example_GetCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionAsync(new RequestContext()); + Response response = await client.GetCollectionAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -76,11 +76,11 @@ public async Task Example_GetCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionAsync(new RequestContext()); + Response response = await client.GetCollectionAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -101,13 +101,12 @@ public async Task Example_GetCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new { }; - - Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -117,21 +116,20 @@ public void Example_CreateOrUpdateCollection() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - description = "", - friendlyName = "", - parentCollection = new + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() { - referenceName = "", + ["referenceName"] = "", }, - }; - - Response response = client.CreateOrUpdateCollection(RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateCollection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -152,13 +150,12 @@ public void Example_CreateOrUpdateCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new { }; - - Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -168,21 +165,20 @@ public async Task Example_CreateOrUpdateCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - description = "", - friendlyName = "", - parentCollection = new + ["description"] = "", + ["friendlyName"] = "", + ["parentCollection"] = new Dictionary() { - referenceName = "", + ["referenceName"] = "", }, - }; - - Response response = await client.CreateOrUpdateCollectionAsync(RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateCollectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("collectionProvisioningState").ToString()); @@ -203,9 +199,9 @@ public async Task Example_CreateOrUpdateCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); Console.WriteLine(response.Status); @@ -215,9 +211,9 @@ public void Example_DeleteCollection() [Ignore("Only validating compilation of examples")] public void Example_DeleteCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = client.DeleteCollection(); Console.WriteLine(response.Status); @@ -227,9 +223,9 @@ public void Example_DeleteCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); Console.WriteLine(response.Status); @@ -239,9 +235,9 @@ public async Task Example_DeleteCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); Response response = await client.DeleteCollectionAsync(); Console.WriteLine(response.Status); @@ -251,11 +247,11 @@ public async Task Example_DeleteCollection_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetCollectionPath() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollectionPath(new RequestContext()); + Response response = client.GetCollectionPath(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -265,11 +261,11 @@ public void Example_GetCollectionPath() [Ignore("Only validating compilation of examples")] public void Example_GetCollectionPath_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = client.GetCollectionPath(new RequestContext()); + Response response = client.GetCollectionPath(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); @@ -280,11 +276,11 @@ public void Example_GetCollectionPath_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollectionPath_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionPathAsync(new RequestContext()); + Response response = await client.GetCollectionPathAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -294,11 +290,11 @@ public async Task Example_GetCollectionPath_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCollectionPath_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - Response response = await client.GetCollectionPathAsync(new RequestContext()); + Response response = await client.GetCollectionPathAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("parentFriendlyNameChain")[0].ToString()); @@ -309,14 +305,14 @@ public async Task Example_GetCollectionPath_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetChildCollectionNames() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - foreach (var item in client.GetChildCollectionNames("", new RequestContext())) + foreach (BinaryData item in client.GetChildCollectionNames(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -324,15 +320,15 @@ public void Example_GetChildCollectionNames() [Ignore("Only validating compilation of examples")] public void Example_GetChildCollectionNames_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - foreach (var item in client.GetChildCollectionNames("", new RequestContext())) + foreach (BinaryData item in client.GetChildCollectionNames("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); } } @@ -340,14 +336,14 @@ public void Example_GetChildCollectionNames_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetChildCollectionNames_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - await foreach (var item in client.GetChildCollectionNamesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetChildCollectionNamesAsync(null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result[0].ToString()); } } @@ -355,15 +351,15 @@ public async Task Example_GetChildCollectionNames_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetChildCollectionNames_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollection client = new PurviewAccountClient(endpoint, credential).GetPurviewCollectionClient(""); - await foreach (var item in client.GetChildCollectionNamesAsync("", new RequestContext())) + await foreach (BinaryData item in client.GetChildCollectionNamesAsync("", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("friendlyName").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("friendlyName").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataPolicyClient.cs b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataPolicyClient.cs index 0236594e989d..459f9764c11f 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataPolicyClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataPolicyClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Administration; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,13 +23,12 @@ public class Samples_PurviewMetadataPolicyClient [Ignore("Only validating compilation of examples")] public void Example_UpdateMetadataPolicy() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - var data = new { }; - - Response response = client.UpdateMetadataPolicy("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.UpdateMetadataPolicy("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -39,68 +38,68 @@ public void Example_UpdateMetadataPolicy() [Ignore("Only validating compilation of examples")] public void Example_UpdateMetadataPolicy_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - name = "", - id = "", - version = 1234, - properties = new + ["name"] = "", + ["id"] = "", + ["version"] = 1234, + ["properties"] = new Dictionary() { - description = "", - decisionRules = new[] { - new { - effect = "Deny", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - attributeRules = new[] { - new { - id = "", - name = "", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - collection = new + ["description"] = "", + ["decisionRules"] = new List() +{ +new Dictionary() +{ +["effect"] = "Deny", +["dnfCondition"] = new List() +{ +new List() +{ +new Dictionary() +{ +["attributeName"] = "", +["attributeValueIncludes"] = "", +["attributeValueIncludedIn"] = new List() +{ +"" +}, +["attributeValueExcludes"] = "", +["attributeValueExcludedIn"] = new List() +{ +"" +}, +} +} +}, +} +}, + ["attributeRules"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["name"] = "", +["dnfCondition"] = new List() +{ +new List() +{ +null +} +}, +} +}, + ["collection"] = new Dictionary() { - referenceName = "", + ["referenceName"] = "", }, - parentCollectionName = "", + ["parentCollectionName"] = "", }, - }; - - Response response = client.UpdateMetadataPolicy("", RequestContent.Create(data)); + }); + Response response = client.UpdateMetadataPolicy("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -131,13 +130,12 @@ public void Example_UpdateMetadataPolicy_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateMetadataPolicy_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - var data = new { }; - - Response response = await client.UpdateMetadataPolicyAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.UpdateMetadataPolicyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -147,68 +145,68 @@ public async Task Example_UpdateMetadataPolicy_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateMetadataPolicy_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - name = "", - id = "", - version = 1234, - properties = new + ["name"] = "", + ["id"] = "", + ["version"] = 1234, + ["properties"] = new Dictionary() { - description = "", - decisionRules = new[] { - new { - effect = "Deny", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - attributeRules = new[] { - new { - id = "", - name = "", - dnfCondition = new[] { - new[] { - new { - attributeName = "", - attributeValueIncludes = "", - attributeValueIncludedIn = new[] { - "" - }, - attributeValueExcludes = "", - attributeValueExcludedIn = new[] { - "" - }, - } - } - }, - } - }, - collection = new + ["description"] = "", + ["decisionRules"] = new List() +{ +new Dictionary() +{ +["effect"] = "Deny", +["dnfCondition"] = new List() +{ +new List() +{ +new Dictionary() +{ +["attributeName"] = "", +["attributeValueIncludes"] = "", +["attributeValueIncludedIn"] = new List() +{ +"" +}, +["attributeValueExcludes"] = "", +["attributeValueExcludedIn"] = new List() +{ +"" +}, +} +} +}, +} +}, + ["attributeRules"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["name"] = "", +["dnfCondition"] = new List() +{ +new List() +{ +null +} +}, +} +}, + ["collection"] = new Dictionary() { - referenceName = "", + ["referenceName"] = "", }, - parentCollectionName = "", + ["parentCollectionName"] = "", }, - }; - - Response response = await client.UpdateMetadataPolicyAsync("", RequestContent.Create(data)); + }); + Response response = await client.UpdateMetadataPolicyAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -239,11 +237,11 @@ public async Task Example_UpdateMetadataPolicy_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetMetadataPolicy() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - Response response = client.GetMetadataPolicy("", new RequestContext()); + Response response = client.GetMetadataPolicy("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -253,11 +251,11 @@ public void Example_GetMetadataPolicy() [Ignore("Only validating compilation of examples")] public void Example_GetMetadataPolicy_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - Response response = client.GetMetadataPolicy("", new RequestContext()); + Response response = client.GetMetadataPolicy("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -288,11 +286,11 @@ public void Example_GetMetadataPolicy_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetadataPolicy_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - Response response = await client.GetMetadataPolicyAsync("", new RequestContext()); + Response response = await client.GetMetadataPolicyAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -302,11 +300,11 @@ public async Task Example_GetMetadataPolicy_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetadataPolicy_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, null, credential); - Response response = await client.GetMetadataPolicyAsync("", new RequestContext()); + Response response = await client.GetMetadataPolicyAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -337,12 +335,14 @@ public async Task Example_GetMetadataPolicy_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetMetadataPolicies() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); - foreach (var item in client.GetMetadataPolicies(new RequestContext())) + foreach (BinaryData item in client.GetMetadataPolicies(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -350,12 +350,14 @@ public void Example_GetMetadataPolicies() [Ignore("Only validating compilation of examples")] public void Example_GetMetadataPolicies_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); - foreach (var item in client.GetMetadataPolicies(new RequestContext())) + foreach (BinaryData item in client.GetMetadataPolicies(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -363,12 +365,14 @@ public void Example_GetMetadataPolicies_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetadataPolicies_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); - await foreach (var item in client.GetMetadataPoliciesAsync(new RequestContext())) + await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -376,12 +380,14 @@ public async Task Example_GetMetadataPolicies_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetadataPolicies_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataPolicyClient(endpoint, "", credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataPolicyClient client = new PurviewMetadataPolicyClient(endpoint, "", credential); - await foreach (var item in client.GetMetadataPoliciesAsync(new RequestContext())) + await foreach (BinaryData item in client.GetMetadataPoliciesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataRolesClient.cs b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataRolesClient.cs index 5ee30fb48e1b..825f8cb8f5fc 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataRolesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewMetadataRolesClient.cs @@ -6,11 +6,9 @@ #nullable disable using System; -using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; -using Azure; +using Azure.Analytics.Purview.Administration; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,12 +21,14 @@ public class Samples_PurviewMetadataRolesClient [Ignore("Only validating compilation of examples")] public void Example_GetMetadataRoles() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataRolesClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); - foreach (var item in client.GetMetadataRoles(new RequestContext())) + foreach (BinaryData item in client.GetMetadataRoles(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -36,12 +36,14 @@ public void Example_GetMetadataRoles() [Ignore("Only validating compilation of examples")] public void Example_GetMetadataRoles_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataRolesClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); - foreach (var item in client.GetMetadataRoles(new RequestContext())) + foreach (BinaryData item in client.GetMetadataRoles(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -49,12 +51,14 @@ public void Example_GetMetadataRoles_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetadataRoles_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataRolesClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); - await foreach (var item in client.GetMetadataRolesAsync(new RequestContext())) + await foreach (BinaryData item in client.GetMetadataRolesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } @@ -62,12 +66,14 @@ public async Task Example_GetMetadataRoles_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetMetadataRoles_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewMetadataRolesClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewMetadataRolesClient client = new PurviewMetadataRolesClient(endpoint, credential); - await foreach (var item in client.GetMetadataRolesAsync(new RequestContext())) + await foreach (BinaryData item in client.GetMetadataRolesAsync(null)) { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs index 8a1e5720b9f7..4013223f1c2b 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs +++ b/sdk/purview/Azure.Analytics.Purview.Administration/tests/Generated/Samples/Samples_PurviewResourceSetRule.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Administration; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +23,11 @@ internal class Samples_PurviewResourceSetRule [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRule() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = client.GetResourceSetRule(new RequestContext()); + Response response = client.GetResourceSetRule(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,11 +37,11 @@ public void Example_GetResourceSetRule() [Ignore("Only validating compilation of examples")] public void Example_GetResourceSetRule_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = client.GetResourceSetRule(new RequestContext()); + Response response = client.GetResourceSetRule(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -135,11 +135,11 @@ public void Example_GetResourceSetRule_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRule_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = await client.GetResourceSetRuleAsync(new RequestContext()); + Response response = await client.GetResourceSetRuleAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -149,11 +149,11 @@ public async Task Example_GetResourceSetRule_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetResourceSetRule_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - Response response = await client.GetResourceSetRuleAsync(new RequestContext()); + Response response = await client.GetResourceSetRuleAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -247,13 +247,12 @@ public async Task Example_GetResourceSetRule_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateResourceSetRule() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new { }; - - Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -263,141 +262,126 @@ public void Example_CreateOrUpdateResourceSetRule() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateResourceSetRule_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - advancedResourceSet = new + ["advancedResourceSet"] = new Dictionary() { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new + ["pathPatternConfig"] = new Dictionary() { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, - }; - - Response response = client.CreateOrUpdateResourceSetRule(RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateResourceSetRule(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -491,13 +475,12 @@ public void Example_CreateOrUpdateResourceSetRule_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateResourceSetRule_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new { }; - - Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -507,141 +490,126 @@ public async Task Example_CreateOrUpdateResourceSetRule_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - advancedResourceSet = new + ["advancedResourceSet"] = new Dictionary() { - modifiedAt = "2022-05-10T18:57:31.2311892Z", - resourceSetProcessing = "Default", + ["modifiedAt"] = "2022-05-10T18:57:31.2311892Z", + ["resourceSetProcessing"] = "Default", }, - pathPatternConfig = new + ["pathPatternConfig"] = new Dictionary() { - acceptedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - complexReplacers = new[] { - new { - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - typeName = "", - } - }, - createdBy = "", - enableDefaultPatterns = true, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - normalizationRules = new[] { - new { - description = "", - disabled = true, - dynamicReplacement = true, - entityTypes = new[] { - "" - }, - lastUpdatedTimestamp = 1234L, - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - version = 123.45d, - } - }, - regexReplacers = new[] { - new { - condition = "", - createdBy = "", - description = "", - disabled = true, - disableRecursiveReplacerApplication = true, - doNotReplaceRegex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - regex = new { - maxDigits = 1234, - maxLetters = 1234, - minDashes = 1234, - minDigits = 1234, - minDigitsOrLetters = 1234, - minDots = 1234, - minHex = 1234, - minLetters = 1234, - minUnderscores = 1234, - options = 1234, - regexStr = "", - }, - replaceWith = "", - } - }, - rejectedPatterns = new[] { - new { - createdBy = "", - filterType = "Pattern", - lastUpdatedTimestamp = 1234L, - modifiedBy = "", - name = "", - path = "", - } - }, - scopedRules = new[] { - new { - bindingUrl = "", - rules = new[] { - new { - displayName = "", - isResourceSet = true, - lastUpdatedTimestamp = 1234L, - name = "", - qualifiedName = "", - } - }, - storeType = "", - } - }, - version = 1234, + ["acceptedPatterns"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["filterType"] = "Pattern", +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["path"] = "", +} +}, + ["complexReplacers"] = new List() +{ +new Dictionary() +{ +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["typeName"] = "", +} +}, + ["createdBy"] = "", + ["enableDefaultPatterns"] = true, + ["lastUpdatedTimestamp"] = 1234L, + ["modifiedBy"] = "", + ["normalizationRules"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["disabled"] = true, +["dynamicReplacement"] = true, +["entityTypes"] = new List() +{ +"" +}, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["regex"] = new Dictionary() +{ +["maxDigits"] = 1234, +["maxLetters"] = 1234, +["minDashes"] = 1234, +["minDigits"] = 1234, +["minDigitsOrLetters"] = 1234, +["minDots"] = 1234, +["minHex"] = 1234, +["minLetters"] = 1234, +["minUnderscores"] = 1234, +["options"] = 1234, +["regexStr"] = "", +}, +["replaceWith"] = "", +["version"] = 123.45, +} +}, + ["regexReplacers"] = new List() +{ +new Dictionary() +{ +["condition"] = "", +["createdBy"] = "", +["description"] = "", +["disabled"] = true, +["disableRecursiveReplacerApplication"] = true, +["doNotReplaceRegex"] = null +, +["lastUpdatedTimestamp"] = 1234L, +["modifiedBy"] = "", +["name"] = "", +["regex"] = null +, +["replaceWith"] = "", +} +}, + ["rejectedPatterns"] = new List() +{ +null +}, + ["scopedRules"] = new List() +{ +new Dictionary() +{ +["bindingUrl"] = "", +["rules"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["isResourceSet"] = true, +["lastUpdatedTimestamp"] = 1234L, +["name"] = "", +["qualifiedName"] = "", +} +}, +["storeType"] = "", +} +}, + ["version"] = 1234, }, - }; - - Response response = await client.CreateOrUpdateResourceSetRuleAsync(RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateResourceSetRuleAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("advancedResourceSet").GetProperty("modifiedAt").ToString()); @@ -735,9 +703,9 @@ public async Task Example_CreateOrUpdateResourceSetRule_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteResourceSetRule() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); Console.WriteLine(response.Status); @@ -747,9 +715,9 @@ public void Example_DeleteResourceSetRule() [Ignore("Only validating compilation of examples")] public void Example_DeleteResourceSetRule_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = client.DeleteResourceSetRule(); Console.WriteLine(response.Status); @@ -759,9 +727,9 @@ public void Example_DeleteResourceSetRule_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteResourceSetRule_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); Console.WriteLine(response.Status); @@ -771,9 +739,9 @@ public async Task Example_DeleteResourceSetRule_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteResourceSetRule_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewResourceSetRule client = new PurviewAccountClient(endpoint, credential).GetPurviewResourceSetRuleClient(); Response response = await client.DeleteResourceSetRuleAsync(); Console.WriteLine(response.Status); diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCatalogClient.xml b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCatalogClient.xml index 5bbc01db73e9..2fcfad621fa7 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCatalogClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCatalogClient.xml @@ -2,51 +2,51 @@ - + This sample shows how to call SearchAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = await client.SearchAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.SearchAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call SearchAsync with all request content, and how to parse the result. +This sample shows how to call SearchAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - keywords = "", - offset = 1234, - limit = 1234, - filter = new {}, - facets = new[] { - new { - count = 1234, - facet = "", - sort = new {}, - } - }, - taxonomySetting = new { - assetTypes = new[] { - "" - }, - facet = new { - count = 1234, - facet = "", - sort = new {}, - }, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keywords"] = "", + ["offset"] = 1234, + ["limit"] = 1234, + ["filter"] = new Dictionary(), + ["facets"] = new List() +{ +new Dictionary() +{ +["count"] = 1234, +["facet"] = "", +["sort"] = new Dictionary(), +} +}, + ["taxonomySetting"] = new Dictionary() + { + ["assetTypes"] = new List() +{ +"" +}, + ["facet"] = null +, }, -}; - -Response response = await client.SearchAsync(RequestContent.Create(data)); +}); +Response response = await client.SearchAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -86,55 +86,54 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetPr Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -]]> - +]]> - + This sample shows how to call Search and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = client.Search(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.Search(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call Search with all request content, and how to parse the result. +This sample shows how to call Search with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - keywords = "", - offset = 1234, - limit = 1234, - filter = new {}, - facets = new[] { - new { - count = 1234, - facet = "", - sort = new {}, - } - }, - taxonomySetting = new { - assetTypes = new[] { - "" - }, - facet = new { - count = 1234, - facet = "", - sort = new {}, - }, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keywords"] = "", + ["offset"] = 1234, + ["limit"] = 1234, + ["filter"] = new Dictionary(), + ["facets"] = new List() +{ +new Dictionary() +{ +["count"] = 1234, +["facet"] = "", +["sort"] = new Dictionary(), +} +}, + ["taxonomySetting"] = new Dictionary() + { + ["assetTypes"] = new List() +{ +"" +}, + ["facet"] = null +, }, -}; - -Response response = client.Search(RequestContent.Create(data)); +}); +Response response = client.Search(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -174,37 +173,35 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetPr Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -]]> - +]]> - + This sample shows how to call SuggestAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = await client.SuggestAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call SuggestAsync with all request content, and how to parse the result. +This sample shows how to call SuggestAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - keywords = "", - limit = 1234, - filter = new {}, -}; - -Response response = await client.SuggestAsync(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), +}); +Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); @@ -224,37 +221,35 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetPr Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -]]> - +]]> - + This sample shows how to call Suggest and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = client.Suggest(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call Suggest with all request content, and how to parse the result. +This sample shows how to call Suggest with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - keywords = "", - limit = 1234, - filter = new {}, -}; - -Response response = client.Suggest(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), +}); +Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); @@ -274,38 +269,36 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetPr Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); -]]> - +]]> - + This sample shows how to call BrowseAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = await client.BrowseAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.BrowseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call BrowseAsync with all request content, and how to parse the result. +This sample shows how to call BrowseAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - entityType = "", - path = "", - limit = 1234, - offset = 1234, -}; - -Response response = await client.BrowseAsync(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entityType"] = "", + ["path"] = "", + ["limit"] = 1234, + ["offset"] = 1234, +}); +Response response = await client.BrowseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -319,38 +312,36 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner")[0].GetProp Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner")[0].GetProperty("contactType").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("path").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); -]]> - +]]> - + This sample shows how to call Browse and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = client.Browse(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.Browse(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call Browse with all request content, and how to parse the result. +This sample shows how to call Browse with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - entityType = "", - path = "", - limit = 1234, - offset = 1234, -}; - -Response response = client.Browse(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entityType"] = "", + ["path"] = "", + ["limit"] = 1234, + ["offset"] = 1234, +}); +Response response = client.Browse(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -364,78 +355,73 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner")[0].GetProp Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner")[0].GetProperty("contactType").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("path").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); -]]> - +]]> - + This sample shows how to call AutoCompleteAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = await client.AutoCompleteAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call AutoCompleteAsync with all request content, and how to parse the result. +This sample shows how to call AutoCompleteAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - keywords = "", - limit = 1234, - filter = new {}, -}; - -Response response = await client.AutoCompleteAsync(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), +}); +Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); -]]> - +]]> - + This sample shows how to call AutoComplete and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); -var data = new {}; - -Response response = client.AutoComplete(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call AutoComplete with all request content, and how to parse the result. +This sample shows how to call AutoComplete with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential); - -var data = new { - keywords = "", - limit = 1234, - filter = new {}, -}; - -Response response = client.AutoComplete(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), +}); +Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCollections.xml b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCollections.xml index 5ab2d6479cef..ab3eac90b2c0 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCollections.xml +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewCollections.xml @@ -2,224 +2,165 @@ - -This sample shows how to call CreateOrUpdateEntityAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateEntityAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -var data = new {}; - -Response response = await client.CreateOrUpdateEntityAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateEntityAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEntityAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateEntityAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new { - entity = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entity"] = new Dictionary() + { + ["businessAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() + { + ["key"] = "", }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = await client.CreateOrUpdateEntityAsync("", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateEntityAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -228,8 +169,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -248,231 +189,171 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateEntity with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateEntity and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -var data = new {}; - -Response response = client.CreateOrUpdateEntity("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateEntity("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEntity with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateEntity with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new { - entity = new { - businessAttributes = new { - key = new {}, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entity"] = new Dictionary() + { + ["businessAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() + { + ["key"] = "", }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = client.CreateOrUpdateEntity("", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateEntity("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -481,8 +362,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -501,233 +382,174 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateEntityInBulkAsync with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateEntityInBulkAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -Response response = await client.CreateOrUpdateEntityInBulkAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEntityInBulkAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateEntityInBulkAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = await client.CreateOrUpdateEntityInBulkAsync("", RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -736,8 +558,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -756,233 +578,174 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call CreateOrUpdateEntityInBulk with required parameters and parse the result. + +This sample shows how to call CreateOrUpdateEntityInBulk and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -var data = new {}; - -Response response = client.CreateOrUpdateEntityInBulk("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateEntityInBulk("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEntityInBulk with all parameters and request content, and how to parse the result. +This sample shows how to call CreateOrUpdateEntityInBulk with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - }, -}; - -Response response = client.CreateOrUpdateEntityInBulk("", RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateEntityInBulk("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -991,8 +754,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1011,74 +774,73 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call MoveEntitiesToCollectionAsync with required parameters and parse the result. + +This sample shows how to call MoveEntitiesToCollectionAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -Response response = await client.MoveEntitiesToCollectionAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.MoveEntitiesToCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call MoveEntitiesToCollectionAsync with all parameters and request content, and how to parse the result. +This sample shows how to call MoveEntitiesToCollectionAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new { - entityGuids = new[] { - "" - }, -}; - -Response response = await client.MoveEntitiesToCollectionAsync("", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entityGuids"] = new List() +{ +"" +}, +}); +Response response = await client.MoveEntitiesToCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1087,8 +849,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1107,74 +869,73 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call MoveEntitiesToCollection with required parameters and parse the result. + +This sample shows how to call MoveEntitiesToCollection and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); -Response response = client.MoveEntitiesToCollection("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.MoveEntitiesToCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call MoveEntitiesToCollection with all parameters and request content, and how to parse the result. +This sample shows how to call MoveEntitiesToCollection with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - -var data = new { - entityGuids = new[] { - "" - }, -}; - -Response response = client.MoveEntitiesToCollection("", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entityGuids"] = new List() +{ +"" +}, +}); +Response response = client.MoveEntitiesToCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1183,8 +944,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1203,11 +964,10 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewEntities.xml b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewEntities.xml index 106a5804c668..f7a261323265 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewEntities.xml +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewEntities.xml @@ -2,224 +2,165 @@ - + This sample shows how to call CreateOrUpdateAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new {}; - -Response response = await client.CreateOrUpdateAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateAsync with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - entity = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entity"] = new Dictionary() + { + ["businessAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() + { + ["key"] = "", }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = await client.CreateOrUpdateAsync(RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -228,8 +169,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -248,231 +189,171 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdate and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.CreateOrUpdate(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdate with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdate with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - entity = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entity"] = new Dictionary() + { + ["businessAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() + { + ["key"] = "", }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = client.CreateOrUpdate(RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -481,8 +362,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -501,24 +382,43 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetByGuidsAsync with required parameters and parse the result. + +This sample shows how to call GetByGuidsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetByGuidsAsync(new List() +{ +"" +}, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByGuidsAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetByGuidsAsync(new String[]{""}, true, true, new String[]{""}, new RequestContext()); +Response response = await client.GetByGuidsAsync(new List() +{ +"" +}, true, true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -526,13 +426,13 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -549,76 +449,95 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].G Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - -This sample shows how to call GetByGuids with required parameters and parse the result. + +This sample shows how to call GetByGuids and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetByGuids(new String[]{""}, true, true, new String[]{""}, new RequestContext()); +Response response = client.GetByGuids(new List() +{ +"" +}, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByGuids with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetByGuids(new List() +{ +"" +}, true, true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -626,13 +545,13 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -649,285 +568,226 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].G Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - + This sample shows how to call CreateOrUpdateEntitiesAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new {}; - -Response response = await client.CreateOrUpdateEntitiesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateOrUpdateEntitiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEntitiesAsync with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateEntitiesAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = await client.CreateOrUpdateEntitiesAsync(RequestContent.Create(data)); +}); +Response response = await client.CreateOrUpdateEntitiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -936,8 +796,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -956,233 +816,174 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call CreateOrUpdateEntities and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.CreateOrUpdateEntities(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateOrUpdateEntities(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateOrUpdateEntities with all request content, and how to parse the result. +This sample shows how to call CreateOrUpdateEntities with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = client.CreateOrUpdateEntities(RequestContent.Create(data)); +}); +Response response = client.CreateOrUpdateEntities(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1191,8 +992,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1211,55 +1012,71 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteByGuidsAsync with required parameters and parse the result. + +This sample shows how to call DeleteByGuidsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.DeleteByGuidsAsync(new List() +{ +"" +}, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByGuidsAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteByGuidsAsync(new String[]{""}, new RequestContext()); +Response response = await client.DeleteByGuidsAsync(new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1268,8 +1085,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1288,55 +1105,71 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteByGuids with required parameters and parse the result. + +This sample shows how to call DeleteByGuids and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.DeleteByGuids(new List() +{ +"" +}, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByGuids with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteByGuids(new String[]{""}, new RequestContext()); +Response response = client.DeleteByGuids(new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1345,8 +1178,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1365,126 +1198,144 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call AddClassificationAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new {}; - -Response response = await client.AddClassificationAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.AddClassificationAsync(content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassificationAsync with all request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - classification = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["classification"] = new Dictionary() + { + ["entityGuid"] = "", + ["entityStatus"] = "ACTIVE", + ["removePropagationsOnEntityDelete"] = true, + ["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - attributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - entityGuids = new[] { - "" - }, -}; - -Response response = await client.AddClassificationAsync(RequestContent.Create(data)); + ["entityGuids"] = new List() +{ +"" +}, +}); +Response response = await client.AddClassificationAsync(content); Console.WriteLine(response.Status); -]]> - +]]> - + This sample shows how to call AddClassification. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new {}; - -Response response = client.AddClassification(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.AddClassification(content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassification with all request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - classification = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["classification"] = new Dictionary() + { + ["entityGuid"] = "", + ["entityStatus"] = "ACTIVE", + ["removePropagationsOnEntityDelete"] = true, + ["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - attributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - entityGuids = new[] { - "" - }, -}; - -Response response = client.AddClassification(RequestContent.Create(data)); + ["entityGuids"] = new List() +{ +"" +}, +}); +Response response = client.AddClassification(content); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call GetByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetByGuidAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetByGuidAsync("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByGuidAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetByGuidAsync("", true, true, new RequestContext()); +Response response = await client.GetByGuidAsync("", true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -1492,13 +1343,13 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0] Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -1515,76 +1366,86 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetPro Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - -This sample shows how to call GetByGuid with required parameters and parse the result. + +This sample shows how to call GetByGuid and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetByGuid("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByGuid with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetByGuid("", true, true, new RequestContext()); +Response response = client.GetByGuid("", true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -1592,13 +1453,13 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0] Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -1615,109 +1476,119 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetPro Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - -This sample shows how to call PartialUpdateEntityAttributeByGuidAsync with required parameters and request content and parse the result. + +This sample shows how to call PartialUpdateEntityAttributeByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new {}; +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateEntityAttributeByGuidAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1726,8 +1597,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1746,57 +1617,67 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call PartialUpdateEntityAttributeByGuid with required parameters and request content and parse the result. + +This sample shows how to call PartialUpdateEntityAttributeByGuid and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new {}; +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateEntityAttributeByGuid with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.PartialUpdateEntityAttributeByGuid("", "", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1805,8 +1686,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1825,55 +1706,65 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteByGuidAsync with required parameters and parse the result. + +This sample shows how to call DeleteByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteByGuidAsync("", new RequestContext()); +Response response = await client.DeleteByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.DeleteByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1882,8 +1773,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1902,55 +1793,65 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteByGuid with required parameters and parse the result. + +This sample shows how to call DeleteByGuid and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteByGuid("", new RequestContext()); +Response response = client.DeleteByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByGuid with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.DeleteByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1959,8 +1860,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1979,21 +1880,31 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetClassificationAsync with required parameters and parse the result. + +This sample shows how to call GetClassificationAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetClassificationAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetClassificationAsync("", "", new RequestContext()); +Response response = await client.GetClassificationAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityGuid").ToString()); @@ -2003,22 +1914,32 @@ Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime" Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetClassification with required parameters and parse the result. + +This sample shows how to call GetClassification and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetClassification("", "", new RequestContext()); +Response response = client.GetClassification("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassification with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetClassification("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityGuid").ToString()); @@ -2028,48 +1949,74 @@ Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime" Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteClassificationAsync with required parameters. + +This sample shows how to call DeleteClassificationAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationAsync("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteClassificationAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.DeleteClassificationAsync("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteClassification with required parameters. + +This sample shows how to call DeleteClassification. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassification("", ""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteClassification with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.DeleteClassification("", ""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetClassificationsAsync with required parameters and parse the result. + +This sample shows how to call GetClassificationsAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetClassificationsAsync("", new RequestContext()); +Response response = await client.GetClassificationsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetClassificationsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("list")[0].ToString()); @@ -2078,18 +2025,28 @@ Console.WriteLine(result.GetProperty("sortBy").ToString()); Console.WriteLine(result.GetProperty("sortType").ToString()); Console.WriteLine(result.GetProperty("startIndex").ToString()); Console.WriteLine(result.GetProperty("totalCount").ToString()); -]]> - +]]> - -This sample shows how to call GetClassifications with required parameters and parse the result. + +This sample shows how to call GetClassifications and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetClassifications("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassifications with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetClassifications("", new RequestContext()); +Response response = client.GetClassifications("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("list")[0].ToString()); @@ -2098,169 +2055,247 @@ Console.WriteLine(result.GetProperty("sortBy").ToString()); Console.WriteLine(result.GetProperty("sortType").ToString()); Console.WriteLine(result.GetProperty("startIndex").ToString()); Console.WriteLine(result.GetProperty("totalCount").ToString()); -]]> - +]]> - -This sample shows how to call AddClassificationsAsync with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + +This sample shows how to call AddClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.AddClassificationsAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.AddClassificationsAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AddClassificationsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = await client.AddClassificationsAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AddClassifications with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + +This sample shows how to call AddClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.AddClassifications("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.AddClassifications("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AddClassifications with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = client.AddClassifications("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call UpdateClassificationsAsync with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + +This sample shows how to call UpdateClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.UpdateClassificationsAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.UpdateClassificationsAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call UpdateClassificationsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = await client.UpdateClassificationsAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call UpdateClassifications with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + +This sample shows how to call UpdateClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.UpdateClassifications("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.UpdateClassifications("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call UpdateClassifications with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = client.UpdateClassifications("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetByUniqueAttributesAsync with required parameters and parse the result. + +This sample shows how to call GetByUniqueAttributesAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetByUniqueAttributesAsync("", true, true, "", new RequestContext()); +Response response = await client.GetByUniqueAttributesAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByUniqueAttributesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetByUniqueAttributesAsync("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -2268,13 +2303,13 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0] Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -2291,76 +2326,86 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetPro Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - -This sample shows how to call GetByUniqueAttributes with required parameters and parse the result. + +This sample shows how to call GetByUniqueAttributes and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetByUniqueAttributes("", true, true, "", new RequestContext()); +Response response = client.GetByUniqueAttributes("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByUniqueAttributes with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetByUniqueAttributes("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -2368,13 +2413,13 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0] Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -2391,283 +2436,223 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetPro Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - -This sample shows how to call PartialUpdateEntityByUniqueAttributesAsync with required parameters and parse the result. + +This sample shows how to call PartialUpdateEntityByUniqueAttributesAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call PartialUpdateEntityByUniqueAttributesAsync with all parameters and request content, and how to parse the result. +This sample shows how to call PartialUpdateEntityByUniqueAttributesAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - entity = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entity"] = new Dictionary() + { + ["businessAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() + { + ["key"] = "", }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", RequestContent.Create(data), ""); +}); +Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content, attrQualifiedName: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -2676,8 +2661,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -2696,231 +2681,171 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call PartialUpdateEntityByUniqueAttributes with required parameters and parse the result. + +This sample shows how to call PartialUpdateEntityByUniqueAttributes and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.PartialUpdateEntityByUniqueAttributes("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.PartialUpdateEntityByUniqueAttributes("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call PartialUpdateEntityByUniqueAttributes with all parameters and request content, and how to parse the result. +This sample shows how to call PartialUpdateEntityByUniqueAttributes with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - entity = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["entity"] = new Dictionary() + { + ["businessAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() + { + ["key"] = "", }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new { - key = new {}, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new { - key = new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, + ["referredEntities"] = new Dictionary() + { + ["key"] = null +, }, -}; - -Response response = client.PartialUpdateEntityByUniqueAttributes("", RequestContent.Create(data), ""); +}); +Response response = client.PartialUpdateEntityByUniqueAttributes("", content, attrQualifiedName: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -2929,8 +2854,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -2949,55 +2874,65 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteByUniqueAttributeAsync with required parameters and parse the result. + +This sample shows how to call DeleteByUniqueAttributeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.DeleteByUniqueAttributeAsync("", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByUniqueAttributeAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteByUniqueAttributeAsync("", "", new RequestContext()); +Response response = await client.DeleteByUniqueAttributeAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -3006,8 +2941,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -3026,55 +2961,65 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteByUniqueAttribute with required parameters and parse the result. + +This sample shows how to call DeleteByUniqueAttribute and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.DeleteByUniqueAttribute("", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByUniqueAttribute with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteByUniqueAttribute("", "", new RequestContext()); +Response response = client.DeleteByUniqueAttribute("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -3083,8 +3028,8 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("c Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -3103,448 +3048,496 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteClassificationByUniqueAttributeAsync with required parameters. + +This sample shows how to call DeleteClassificationByUniqueAttributeAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationByUniqueAttributeAsync("", ""); Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteClassificationByUniqueAttributeAsync with all parameters. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteClassificationByUniqueAttributeAsync("", "", ""); +Response response = await client.DeleteClassificationByUniqueAttributeAsync("", "", attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call DeleteClassificationByUniqueAttribute with required parameters. + +This sample shows how to call DeleteClassificationByUniqueAttribute. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassificationByUniqueAttribute("", ""); Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteClassificationByUniqueAttribute with all parameters. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteClassificationByUniqueAttribute("", "", ""); +Response response = client.DeleteClassificationByUniqueAttribute("", "", attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call AddClassificationsByUniqueAttributeAsync with required parameters and request content. + +This sample shows how to call AddClassificationsByUniqueAttributeAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - new {} -}; - -Response response = await client.AddClassificationsByUniqueAttributeAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassificationsByUniqueAttributeAsync with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.AddClassificationsByUniqueAttributeAsync("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call AddClassificationsByUniqueAttribute with required parameters and request content. + +This sample shows how to call AddClassificationsByUniqueAttribute. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new {} -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.AddClassificationsByUniqueAttribute("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.AddClassificationsByUniqueAttribute("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddClassificationsByUniqueAttribute with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.AddClassificationsByUniqueAttribute("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = client.AddClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call UpdateClassificationsByUniqueAttributeAsync with required parameters and request content. + +This sample shows how to call UpdateClassificationsByUniqueAttributeAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new {} -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateClassificationsByUniqueAttributeAsync with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call UpdateClassificationsByUniqueAttribute with required parameters and request content. + +This sample shows how to call UpdateClassificationsByUniqueAttribute. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new {} -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.UpdateClassificationsByUniqueAttribute("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.UpdateClassificationsByUniqueAttribute("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call UpdateClassificationsByUniqueAttribute with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.UpdateClassificationsByUniqueAttribute("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); +Response response = client.UpdateClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - + This sample shows how to call SetClassificationsAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.SetClassificationsAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.SetClassificationsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); ]]> -This sample shows how to call SetClassificationsAsync with all request content, and how to parse the result. +This sample shows how to call SetClassificationsAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - guidHeaderMap = new { - key = new { - classificationNames = new[] { - "" - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new[] { - "" - }, - meaningNames = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - status = "ACTIVE", - attributes = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["guidHeaderMap"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["classificationNames"] = new List() +{ +"" +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["displayText"] = "", + ["guid"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meaningNames"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["status"] = "ACTIVE", + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, }, -}; - -Response response = await client.SetClassificationsAsync(RequestContent.Create(data)); +}); +Response response = await client.SetClassificationsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> - +]]> - + This sample shows how to call SetClassifications and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.SetClassifications(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.SetClassifications(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); ]]> -This sample shows how to call SetClassifications with all request content, and how to parse the result. +This sample shows how to call SetClassifications with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - guidHeaderMap = new { - key = new { - classificationNames = new[] { - "" - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new[] { - "" - }, - meaningNames = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - status = "ACTIVE", - attributes = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["guidHeaderMap"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["classificationNames"] = new List() +{ +"" +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["displayText"] = "", + ["guid"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meaningNames"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["status"] = "ACTIVE", + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, }, -}; - -Response response = client.SetClassifications(RequestContent.Create(data)); +}); +Response response = client.SetClassifications(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); -]]> - +]]> - -This sample shows how to call GetEntitiesByUniqueAttributesAsync with required parameters and parse the result. + +This sample shows how to call GetEntitiesByUniqueAttributesAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetEntitiesByUniqueAttributesAsync("", true, true, "", new RequestContext()); +Response response = await client.GetEntitiesByUniqueAttributesAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntitiesByUniqueAttributesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetEntitiesByUniqueAttributesAsync("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -3552,13 +3545,13 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -3575,76 +3568,86 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].G Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - -This sample shows how to call GetEntitiesByUniqueAttributes with required parameters and parse the result. + +This sample shows how to call GetEntitiesByUniqueAttributes and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetEntitiesByUniqueAttributes("", true, true, "", new RequestContext()); +Response response = client.GetEntitiesByUniqueAttributes("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntitiesByUniqueAttributes with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetEntitiesByUniqueAttributes("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -3652,13 +3655,13 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -3675,73 +3678,83 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].G Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); -]]> - +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +]]> - -This sample shows how to call GetHeaderAsync with required parameters and parse the result. + +This sample shows how to call GetHeaderAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetHeaderAsync("", new RequestContext()); +Response response = await client.GetHeaderAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetHeaderAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetHeaderAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); @@ -3752,8 +3765,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("displayText").ToString()); @@ -3772,21 +3785,31 @@ Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToStri Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetHeader with required parameters and parse the result. + +This sample shows how to call GetHeader and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetHeader("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetHeader with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetHeader("", new RequestContext()); +Response response = client.GetHeader("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); @@ -3797,8 +3820,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("displayText").ToString()); @@ -3817,223 +3840,307 @@ Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToStri Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteBusinessMetadataAsync with required parameters and request content. + +This sample shows how to call DeleteBusinessMetadataAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - key = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteBusinessMetadataAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.DeleteBusinessMetadataAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteBusinessMetadataAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = await client.DeleteBusinessMetadataAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteBusinessMetadata with required parameters and request content. + +This sample shows how to call DeleteBusinessMetadata. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - key = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteBusinessMetadata("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.DeleteBusinessMetadata("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteBusinessMetadata with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = client.DeleteBusinessMetadata("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AddOrUpdateBusinessMetadataAsync with required parameters and request content. + +This sample shows how to call AddOrUpdateBusinessMetadataAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - key = new {}, -}; - -Response response = await client.AddOrUpdateBusinessMetadataAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddOrUpdateBusinessMetadataAsync with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - key = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.AddOrUpdateBusinessMetadataAsync("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, isOverwrite: true); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call AddOrUpdateBusinessMetadata with required parameters and request content. + +This sample shows how to call AddOrUpdateBusinessMetadata. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - key = new {}, -}; - -Response response = client.AddOrUpdateBusinessMetadata("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.AddOrUpdateBusinessMetadata("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddOrUpdateBusinessMetadata with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - key = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.AddOrUpdateBusinessMetadata("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = client.AddOrUpdateBusinessMetadata("", content, isOverwrite: true); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call DeleteBusinessMetadataAttributesAsync with required parameters and request content. + +This sample shows how to call DeleteBusinessMetadataAttributesAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - key = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteBusinessMetadataAttributesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteBusinessMetadataAttributes with required parameters and request content. + +This sample shows how to call DeleteBusinessMetadataAttributes. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new { - key = new {}, -}; - -Response response = client.DeleteBusinessMetadataAttributes("", "", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.DeleteBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteBusinessMetadataAttributes with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = client.DeleteBusinessMetadataAttributes("", "", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync with required parameters and request content. + +This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - key = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AddOrUpdateBusinessMetadataAttributes with required parameters and request content. + +This sample shows how to call AddOrUpdateBusinessMetadataAttributes. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new { - key = new {}, -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AddOrUpdateBusinessMetadataAttributes with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = new Dictionary(), +}); +Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetSampleBusinessMetadataTemplateAsync with required parameters and parse the result. + +This sample shows how to call GetSampleBusinessMetadataTemplateAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.GetSampleBusinessMetadataTemplateAsync(new RequestContext()); +Response response = await client.GetSampleBusinessMetadataTemplateAsync(null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call GetSampleBusinessMetadataTemplateAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = await client.GetSampleBusinessMetadataTemplateAsync(null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call GetSampleBusinessMetadataTemplate with required parameters and parse the result. + +This sample shows how to call GetSampleBusinessMetadataTemplate and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.GetSampleBusinessMetadataTemplate(new RequestContext()); +Response response = client.GetSampleBusinessMetadataTemplate(null); if (response.ContentStream != null) { - using(Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } } ]]> - +This sample shows how to call GetSampleBusinessMetadataTemplate with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +Response response = client.GetSampleBusinessMetadataTemplate(null); +if (response.ContentStream != null) +{ + using (Stream outFileStream = File.OpenWrite("")) + { + response.ContentStream.CopyTo(outFileStream); + } +} +]]> - -This sample shows how to call ImportBusinessMetadataAsync with required request content and parse the result. + +This sample shows how to call ImportBusinessMetadataAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = File.OpenRead(""); +RequestContent content = null; +Response response = await client.ImportBusinessMetadataAsync(content); -Response response = await client.ImportBusinessMetadataAsync(RequestContent.Create(data)); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ImportBusinessMetadataAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(File.OpenRead("")); +Response response = await client.ImportBusinessMetadataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); @@ -4044,20 +4151,30 @@ Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("ch Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); -]]> - +]]> - -This sample shows how to call ImportBusinessMetadata with required request content and parse the result. + +This sample shows how to call ImportBusinessMetadata and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = null; +Response response = client.ImportBusinessMetadata(content); -var data = File.OpenRead(""); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ImportBusinessMetadata with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.ImportBusinessMetadata(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Response response = client.ImportBusinessMetadata(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); @@ -4068,290 +4185,319 @@ Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("ch Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); -]]> - +]]> - -This sample shows how to call DeleteLabelsAsync with required parameters and request content. + +This sample shows how to call DeleteLabelsAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteLabelsAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.DeleteLabelsAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteLabelsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.DeleteLabelsAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteLabels with required parameters and request content. + +This sample shows how to call DeleteLabels. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = client.DeleteLabels("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.DeleteLabels("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteLabels with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.DeleteLabels("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call SetLabelsAsync with required parameters and request content. + +This sample shows how to call SetLabelsAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = await client.SetLabelsAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.SetLabelsAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call SetLabelsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.SetLabelsAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call SetLabels with required parameters and request content. + +This sample shows how to call SetLabels. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.SetLabels("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.SetLabels("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call SetLabels with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.SetLabels("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AddLabelAsync with required parameters and request content. + +This sample shows how to call AddLabelAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = await client.AddLabelAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.AddLabelAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AddLabelAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.AddLabelAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AddLabel with required parameters and request content. + +This sample shows how to call AddLabel. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = client.AddLabel("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.AddLabel("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AddLabel with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.AddLabel("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteLabelsByUniqueAttributeAsync with required parameters and request content. + +This sample shows how to call DeleteLabelsByUniqueAttributeAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.DeleteLabelsByUniqueAttributeAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteLabelsByUniqueAttributeAsync with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = await client.DeleteLabelsByUniqueAttributeAsync("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call DeleteLabelsByUniqueAttribute with required parameters and request content. + +This sample shows how to call DeleteLabelsByUniqueAttribute. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.DeleteLabelsByUniqueAttribute("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.DeleteLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteLabelsByUniqueAttribute with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = client.DeleteLabelsByUniqueAttribute("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.DeleteLabelsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call SetLabelsByUniqueAttributeAsync with required parameters and request content. + +This sample shows how to call SetLabelsByUniqueAttributeAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.SetLabelsByUniqueAttributeAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.SetLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call SetLabelsByUniqueAttributeAsync with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.SetLabelsByUniqueAttributeAsync("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call SetLabelsByUniqueAttribute with required parameters and request content. + +This sample shows how to call SetLabelsByUniqueAttribute. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = client.SetLabelsByUniqueAttribute("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.SetLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call SetLabelsByUniqueAttribute with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.SetLabelsByUniqueAttribute("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.SetLabelsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call AddLabelsByUniqueAttributeAsync with required parameters and request content. + +This sample shows how to call AddLabelsByUniqueAttributeAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = await client.AddLabelsByUniqueAttributeAsync("", RequestContent.Create(data)); +RequestContent content = null; +Response response = await client.AddLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddLabelsByUniqueAttributeAsync with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = await client.AddLabelsByUniqueAttributeAsync("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.AddLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call AddLabelsByUniqueAttribute with required parameters and request content. + +This sample shows how to call AddLabelsByUniqueAttribute. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -Response response = client.AddLabelsByUniqueAttribute("", RequestContent.Create(data)); +RequestContent content = null; +Response response = client.AddLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); ]]> This sample shows how to call AddLabelsByUniqueAttribute with all parameters and request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); -var data = new[] { - "" -}; - -Response response = client.AddLabelsByUniqueAttribute("", RequestContent.Create(data), ""); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.AddLabelsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); -]]> - +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewGlossaries.xml b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewGlossaries.xml index f76f485a0206..e47055126acb 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewGlossaries.xml +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewGlossaries.xml @@ -2,14 +2,25 @@ - -This sample shows how to call GetGlossariesAsync with required parameters and parse the result. + +This sample shows how to call GetGlossariesAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossariesAsync(1234, 1234, "", true, new RequestContext()); +Response response = await client.GetGlossariesAsync(null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossariesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossariesAsync(1234, 1234, "", true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -34,8 +45,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -44,18 +55,28 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaries with required parameters and parse the result. + +This sample shows how to call GetGlossaries and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossaries(null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaries with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaries(1234, 1234, "", true, new RequestContext()); +Response response = client.GetGlossaries(1234, 1234, "", true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -80,8 +101,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -90,422 +111,94 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - + This sample shows how to call CreateGlossaryAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = await client.CreateGlossaryAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateGlossaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateGlossaryAsync with all request content, and how to parse the result. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - categoryInfo = new { - key = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new { - key = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = await client.CreateGlossaryAsync(RequestContent.Create(data)); +This sample shows how to call CreateGlossaryAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = await client.CreateGlossaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -530,8 +223,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -540,422 +233,94 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - + This sample shows how to call CreateGlossary and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.CreateGlossary(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateGlossary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateGlossary with all request content, and how to parse the result. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - categoryInfo = new { - key = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new { - key = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = client.CreateGlossary(RequestContent.Create(data)); +This sample shows how to call CreateGlossary with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = client.CreateGlossary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -980,8 +345,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -990,85 +355,106 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call CreateGlossaryCategoriesAsync with required request content and parse the result. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; + +This sample shows how to call CreateGlossaryCategoriesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.CreateGlossaryCategoriesAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.CreateGlossaryCategoriesAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call CreateGlossaryCategoriesAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, +["parentCategory"] = null +, +["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); +Response response = await client.CreateGlossaryCategoriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1099,8 +485,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -1109,85 +495,106 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call CreateGlossaryCategories with required request content and parse the result. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; + +This sample shows how to call CreateGlossaryCategories and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.CreateGlossaryCategories(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.CreateGlossaryCategories(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call CreateGlossaryCategories with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, +["parentCategory"] = null +, +["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); +Response response = client.CreateGlossaryCategories(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1218,8 +625,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -1228,96 +635,100 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - + This sample shows how to call CreateGlossaryCategoryAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = await client.CreateGlossaryCategoryAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateGlossaryCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateGlossaryCategoryAsync with all request content, and how to parse the result. +This sample shows how to call CreateGlossaryCategoryAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = await client.CreateGlossaryCategoryAsync(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null +, + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = await client.CreateGlossaryCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1348,8 +759,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1358,96 +769,100 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - + This sample shows how to call CreateGlossaryCategory and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.CreateGlossaryCategory(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateGlossaryCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateGlossaryCategory with all request content, and how to parse the result. +This sample shows how to call CreateGlossaryCategory with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = client.CreateGlossaryCategory(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null +, + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = client.CreateGlossaryCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1478,8 +893,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1488,18 +903,28 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryCategoryAsync with required parameters and parse the result. + +This sample shows how to call GetGlossaryCategoryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossaryCategoryAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossaryCategoryAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryCategoryAsync("", new RequestContext()); +Response response = await client.GetGlossaryCategoryAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1530,8 +955,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1540,18 +965,28 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryCategory with required parameters and parse the result. + +This sample shows how to call GetGlossaryCategory and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossaryCategory("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossaryCategory with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaryCategory("", new RequestContext()); +Response response = client.GetGlossaryCategory("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1582,8 +1017,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1592,96 +1027,100 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call UpdateGlossaryCategoryAsync with required parameters and parse the result. + +This sample shows how to call UpdateGlossaryCategoryAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = await client.UpdateGlossaryCategoryAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateGlossaryCategoryAsync with all parameters and request content, and how to parse the result. +This sample shows how to call UpdateGlossaryCategoryAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = await client.UpdateGlossaryCategoryAsync("", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null +, + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = await client.UpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1712,8 +1151,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1722,96 +1161,100 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call UpdateGlossaryCategory with required parameters and parse the result. + +This sample shows how to call UpdateGlossaryCategory and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.UpdateGlossaryCategory("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateGlossaryCategory with all parameters and request content, and how to parse the result. +This sample shows how to call UpdateGlossaryCategory with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = client.UpdateGlossaryCategory("", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null +, + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = client.UpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1842,8 +1285,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1852,48 +1295,78 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call DeleteGlossaryCategoryAsync with required parameters. + +This sample shows how to call DeleteGlossaryCategoryAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryCategoryAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGlossaryCategoryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.DeleteGlossaryCategoryAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteGlossaryCategory with required parameters. + +This sample shows how to call DeleteGlossaryCategory. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryCategory(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGlossaryCategory with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.DeleteGlossaryCategory(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call PartialUpdateGlossaryCategoryAsync with required parameters and request content and parse the result. + +This sample shows how to call PartialUpdateGlossaryCategoryAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new { - key = "", -}; +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = await client.PartialUpdateGlossaryCategoryAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateGlossaryCategoryAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.PartialUpdateGlossaryCategoryAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = await client.PartialUpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1924,8 +1397,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1934,22 +1407,36 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call PartialUpdateGlossaryCategory with required parameters and request content and parse the result. + +This sample shows how to call PartialUpdateGlossaryCategory and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new { - key = "", -}; +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = client.PartialUpdateGlossaryCategory("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateGlossaryCategory with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.PartialUpdateGlossaryCategory("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = client.PartialUpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1980,8 +1467,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1990,56 +1477,86 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetRelatedCategoriesAsync with required parameters and parse the result. + +This sample shows how to call GetRelatedCategoriesAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", new RequestContext()); +Response response = await client.GetRelatedCategoriesAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].ToString()); ]]> - +This sample shows how to call GetRelatedCategoriesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +]]> - -This sample shows how to call GetRelatedCategories with required parameters and parse the result. + +This sample shows how to call GetRelatedCategories and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetRelatedCategories("", 1234, 1234, "", new RequestContext()); +Response response = client.GetRelatedCategories("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].ToString()); ]]> - +This sample shows how to call GetRelatedCategories with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetRelatedCategories("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +]]> - -This sample shows how to call GetCategoryTermsAsync with required parameters and parse the result. + +This sample shows how to call GetCategoryTermsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetCategoryTermsAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategoryTermsAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", new RequestContext()); +Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -2050,18 +1567,28 @@ Console.WriteLine(result[0].GetProperty("source").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("steward").ToString()); Console.WriteLine(result[0].GetProperty("termGuid").ToString()); -]]> - +]]> - -This sample shows how to call GetCategoryTerms with required parameters and parse the result. + +This sample shows how to call GetCategoryTerms and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetCategoryTerms("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategoryTerms with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetCategoryTerms("", 1234, 1234, "", new RequestContext()); +Response response = client.GetCategoryTerms("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -2072,300 +1599,213 @@ Console.WriteLine(result[0].GetProperty("source").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("steward").ToString()); Console.WriteLine(result[0].GetProperty("termGuid").ToString()); -]]> - +]]> - -This sample shows how to call CreateGlossaryTermAsync with required parameters and parse the result. + +This sample shows how to call CreateGlossaryTermAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = await client.CreateGlossaryTermAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateGlossaryTermAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateGlossaryTermAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateGlossaryTermAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, + }, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = await client.CreateGlossaryTermAsync(RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = await client.CreateGlossaryTermAsync(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -2388,20 +1828,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -2512,8 +1952,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -2522,300 +1962,213 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call CreateGlossaryTerm with required parameters and parse the result. + +This sample shows how to call CreateGlossaryTerm and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = client.CreateGlossaryTerm(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateGlossaryTerm(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateGlossaryTerm with all parameters and request content, and how to parse the result. +This sample shows how to call CreateGlossaryTerm with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, + }, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = client.CreateGlossaryTerm(RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = client.CreateGlossaryTerm(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -2838,20 +2191,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -2962,8 +2315,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -2972,18 +2325,31 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryTermAsync with required parameters and parse the result. + +This sample shows how to call GetGlossaryTermAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossaryTermAsync("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossaryTermAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryTermAsync("", true, new String[]{""}, new RequestContext()); +Response response = await client.GetGlossaryTermAsync("", true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -3006,20 +2372,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -3130,8 +2496,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -3140,18 +2506,31 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryTerm with required parameters and parse the result. + +This sample shows how to call GetGlossaryTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossaryTerm("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossaryTerm with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaryTerm("", true, new String[]{""}, new RequestContext()); +Response response = client.GetGlossaryTerm("", true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -3174,20 +2553,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -3298,8 +2677,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -3308,300 +2687,213 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call UpdateGlossaryTermAsync with required parameters and parse the result. + +This sample shows how to call UpdateGlossaryTermAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = await client.UpdateGlossaryTermAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateGlossaryTermAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateGlossaryTermAsync with all parameters and request content, and how to parse the result. +This sample shows how to call UpdateGlossaryTermAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, + }, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = await client.UpdateGlossaryTermAsync("", RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = await client.UpdateGlossaryTermAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -3624,20 +2916,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -3748,8 +3040,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -3758,300 +3050,213 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call UpdateGlossaryTerm with required parameters and parse the result. + +This sample shows how to call UpdateGlossaryTerm and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = client.UpdateGlossaryTerm("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateGlossaryTerm("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateGlossaryTerm with all parameters and request content, and how to parse the result. +This sample shows how to call UpdateGlossaryTerm with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() + { + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", + }, + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() + { + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, + }, + ["attributes"] = new Dictionary() + { + ["key"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = client.UpdateGlossaryTerm("", RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = client.UpdateGlossaryTerm("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -4074,20 +3279,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -4198,8 +3403,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -4208,63 +3413,78 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call DeleteGlossaryTermAsync with required parameters. + +This sample shows how to call DeleteGlossaryTermAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryTermAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGlossaryTermAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.DeleteGlossaryTermAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteGlossaryTerm with required parameters. + +This sample shows how to call DeleteGlossaryTerm. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryTerm(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGlossaryTerm with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.DeleteGlossaryTerm(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call PartialUpdateGlossaryTermAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call PartialUpdateGlossaryTermAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - key = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.PartialUpdateGlossaryTermAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = await client.PartialUpdateGlossaryTermAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call PartialUpdateGlossaryTermAsync with all parameters and request content, and how to parse the result. +This sample shows how to call PartialUpdateGlossaryTermAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new { - key = "", -}; - -Response response = await client.PartialUpdateGlossaryTermAsync("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = await client.PartialUpdateGlossaryTermAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -4287,20 +3507,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -4411,8 +3631,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -4421,37 +3641,36 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call PartialUpdateGlossaryTerm with required parameters and request content, and how to parse the result. + +This sample shows how to call PartialUpdateGlossaryTerm and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new { - key = "", -}; - -Response response = client.PartialUpdateGlossaryTerm("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = client.PartialUpdateGlossaryTerm("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call PartialUpdateGlossaryTerm with all parameters and request content, and how to parse the result. +This sample shows how to call PartialUpdateGlossaryTerm with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - key = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.PartialUpdateGlossaryTerm("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = client.PartialUpdateGlossaryTerm("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -4474,20 +3693,20 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -4598,8 +3817,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -4608,304 +3827,219 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call CreateGlossaryTermsAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateGlossaryTermsAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new[] { - new {} -}; - -Response response = await client.CreateGlossaryTermsAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.CreateGlossaryTermsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); ]]> -This sample shows how to call CreateGlossaryTermsAsync with all parameters and request content, and how to parse the result. +This sample shows how to call CreateGlossaryTermsAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; - -Response response = await client.CreateGlossaryTermsAsync(RequestContent.Create(data), true); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["abbreviation"] = "", +["templateName"] = new List() +{ +new Dictionary() +}, +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["status"] = "Draft", +["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +}, +["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, +["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, +["classifies"] = new List() +{ +null +}, +["examples"] = new List() +{ +"" +}, +["isA"] = new List() +{ +null +}, +["preferredTerms"] = new List() +{ +null +}, +["preferredToTerms"] = new List() +{ +null +}, +["replacedBy"] = new List() +{ +null +}, +["replacementTerms"] = new List() +{ +null +}, +["seeAlso"] = new List() +{ +null +}, +["synonyms"] = new List() +{ +null +}, +["translatedTerms"] = new List() +{ +null +}, +["translationTerms"] = new List() +{ +null +}, +["usage"] = "", +["validValues"] = new List() +{ +null +}, +["validValuesFor"] = new List() +{ +null +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); +Response response = await client.CreateGlossaryTermsAsync(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -4928,20 +4062,20 @@ Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -5052,8 +4186,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -5062,304 +4196,219 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call CreateGlossaryTerms with required parameters and request content, and how to parse the result. + +This sample shows how to call CreateGlossaryTerms and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new {} -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.CreateGlossaryTerms(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.CreateGlossaryTerms(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); ]]> -This sample shows how to call CreateGlossaryTerms with all parameters and request content, and how to parse the result. +This sample shows how to call CreateGlossaryTerms with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; - -Response response = client.CreateGlossaryTerms(RequestContent.Create(data), true); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["abbreviation"] = "", +["templateName"] = new List() +{ +new Dictionary() +}, +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["status"] = "Draft", +["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +}, +["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, +["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, +["classifies"] = new List() +{ +null +}, +["examples"] = new List() +{ +"" +}, +["isA"] = new List() +{ +null +}, +["preferredTerms"] = new List() +{ +null +}, +["preferredToTerms"] = new List() +{ +null +}, +["replacedBy"] = new List() +{ +null +}, +["replacementTerms"] = new List() +{ +null +}, +["seeAlso"] = new List() +{ +null +}, +["synonyms"] = new List() +{ +null +}, +["translatedTerms"] = new List() +{ +null +}, +["translationTerms"] = new List() +{ +null +}, +["usage"] = "", +["validValues"] = new List() +{ +null +}, +["validValuesFor"] = new List() +{ +null +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); +Response response = client.CreateGlossaryTerms(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -5382,20 +4431,20 @@ Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -5506,8 +4555,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -5516,406 +4565,468 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetEntitiesAssignedWithTermAsync with required parameters and parse the result. + +This sample shows how to call GetEntitiesAssignedWithTermAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", new RequestContext()); +Response response = await client.GetEntitiesAssignedWithTermAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetEntitiesAssignedWithTermAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -]]> - +Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +]]> - -This sample shows how to call GetEntitiesAssignedWithTerm with required parameters and parse the result. + +This sample shows how to call GetEntitiesAssignedWithTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetEntitiesAssignedWithTerm("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetEntitiesAssignedWithTerm with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", new RequestContext()); +Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -]]> - +Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +]]> - -This sample shows how to call AssignTermToEntitiesAsync with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; - -Response response = await client.AssignTermToEntitiesAsync("", RequestContent.Create(data)); + +This sample shows how to call AssignTermToEntitiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.AssignTermToEntitiesAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AssignTermToEntitiesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); +Response response = await client.AssignTermToEntitiesAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call AssignTermToEntities with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; - -Response response = client.AssignTermToEntities("", RequestContent.Create(data)); + +This sample shows how to call AssignTermToEntities. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.AssignTermToEntities("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call AssignTermToEntities with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); +Response response = client.AssignTermToEntities("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call RemoveTermAssignmentFromEntitiesAsync with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; - -Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", RequestContent.Create(data)); + +This sample shows how to call RemoveTermAssignmentFromEntitiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call RemoveTermAssignmentFromEntitiesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); +Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call RemoveTermAssignmentFromEntities with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; - -Response response = client.RemoveTermAssignmentFromEntities("", RequestContent.Create(data)); + +This sample shows how to call RemoveTermAssignmentFromEntities. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.RemoveTermAssignmentFromEntities("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call RemoveTermAssignmentFromEntities with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); +Response response = client.RemoveTermAssignmentFromEntities("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; - -Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", RequestContent.Create(data)); + +This sample shows how to call DeleteTermAssignmentFromEntitiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTermAssignmentFromEntities with required parameters and request content. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; - -Response response = client.DeleteTermAssignmentFromEntities("", RequestContent.Create(data)); + +This sample shows how to call DeleteTermAssignmentFromEntities. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); +Response response = client.DeleteTermAssignmentFromEntities("", content); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTermAssignmentFromEntities with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); +Response response = client.DeleteTermAssignmentFromEntities("", content); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetRelatedTermsAsync with required parameters and parse the result. + +This sample shows how to call GetRelatedTermsAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", new RequestContext()); +Response response = await client.GetRelatedTermsAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].ToString()); ]]> - +This sample shows how to call GetRelatedTermsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); +]]> - -This sample shows how to call GetRelatedTerms with required parameters and parse the result. + +This sample shows how to call GetRelatedTerms and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetRelatedTerms("", 1234, 1234, "", new RequestContext()); +Response response = client.GetRelatedTerms("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].ToString()); ]]> - +This sample shows how to call GetRelatedTerms with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetRelatedTerms("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); +]]> - -This sample shows how to call GetGlossaryAsync with required parameters and parse the result. + +This sample shows how to call GetGlossaryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossaryAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossaryAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryAsync("", new RequestContext()); +Response response = await client.GetGlossaryAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -5940,8 +5051,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -5950,18 +5061,28 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossary with required parameters and parse the result. + +This sample shows how to call GetGlossary and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossary("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossary with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossary("", new RequestContext()); +Response response = client.GetGlossary("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -5986,8 +5107,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -5996,422 +5117,94 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call UpdateGlossaryAsync with required parameters and parse the result. + +This sample shows how to call UpdateGlossaryAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.UpdateGlossaryAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateGlossaryAsync with all parameters and request content, and how to parse the result. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - categoryInfo = new { - key = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new { - key = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = await client.UpdateGlossaryAsync("", RequestContent.Create(data)); +This sample shows how to call UpdateGlossaryAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = await client.UpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -6436,8 +5229,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -6446,422 +5239,94 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call UpdateGlossary with required parameters and parse the result. + +This sample shows how to call UpdateGlossary and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new {}; - -Response response = client.UpdateGlossary("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateGlossary with all parameters and request content, and how to parse the result. -"); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - categoryInfo = new { - key = new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new { - key = new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", -}; - -Response response = client.UpdateGlossary("", RequestContent.Create(data)); +This sample shows how to call UpdateGlossary with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", +}); +Response response = client.UpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -6886,8 +5351,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -6896,44 +5361,70 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call DeleteGlossaryAsync with required parameters. + +This sample shows how to call DeleteGlossaryAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGlossaryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.DeleteGlossaryAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteGlossary with required parameters. + +This sample shows how to call DeleteGlossary. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossary(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteGlossary with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.DeleteGlossary(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetGlossaryCategoriesAsync with required parameters and parse the result. + +This sample shows how to call GetGlossaryCategoriesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossaryCategoriesAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryCategoriesAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryCategoriesAsync("", 1234, 1234, "", new RequestContext()); +Response response = await client.GetGlossaryCategoriesAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -6964,8 +5455,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -6974,18 +5465,28 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryCategories with required parameters and parse the result. + +This sample shows how to call GetGlossaryCategories and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossaryCategories("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryCategories with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaryCategories("", 1234, 1234, "", new RequestContext()); +Response response = client.GetGlossaryCategories("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -7016,8 +5517,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -7026,18 +5527,28 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryCategoriesHeadersAsync with required parameters and parse the result. + +This sample shows how to call GetGlossaryCategoriesHeadersAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossaryCategoriesHeadersAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryCategoriesHeadersAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryCategoriesHeadersAsync("", 1234, 1234, "", new RequestContext()); +Response response = await client.GetGlossaryCategoriesHeadersAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); @@ -7045,18 +5556,28 @@ Console.WriteLine(result[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryCategoriesHeaders with required parameters and parse the result. + +This sample shows how to call GetGlossaryCategoriesHeaders and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossaryCategoriesHeaders("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryCategoriesHeaders with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaryCategoriesHeaders("", 1234, 1234, "", new RequestContext()); +Response response = client.GetGlossaryCategoriesHeaders("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); @@ -7064,212 +5585,222 @@ Console.WriteLine(result[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); -]]> - +]]> - -This sample shows how to call GetDetailedGlossaryAsync with required parameters and parse the result. + +This sample shows how to call GetDetailedGlossaryAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetDetailedGlossaryAsync("", true, new RequestContext()); +Response response = await client.GetDetailedGlossaryAsync("", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDetailedGlossaryAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetDetailedGlossaryAsync("", true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -7292,8 +5823,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -7302,212 +5833,222 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetDetailedGlossary with required parameters and parse the result. + +This sample shows how to call GetDetailedGlossary and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetDetailedGlossary("", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDetailedGlossary with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetDetailedGlossary("", true, new RequestContext()); +Response response = client.GetDetailedGlossary("", true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -7530,8 +6071,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -7540,37 +6081,36 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call PartialUpdateGlossaryAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call PartialUpdateGlossaryAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - key = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.PartialUpdateGlossaryAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = await client.PartialUpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call PartialUpdateGlossaryAsync with all parameters and request content, and how to parse the result. +This sample shows how to call PartialUpdateGlossaryAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new { - key = "", -}; - -Response response = await client.PartialUpdateGlossaryAsync("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = await client.PartialUpdateGlossaryAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -7595,8 +6135,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -7605,37 +6145,36 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call PartialUpdateGlossary with required parameters and request content, and how to parse the result. + +This sample shows how to call PartialUpdateGlossary and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new { - key = "", -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.PartialUpdateGlossary("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = client.PartialUpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call PartialUpdateGlossary with all parameters and request content, and how to parse the result. +This sample shows how to call PartialUpdateGlossary with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new { - key = "", -}; - -Response response = client.PartialUpdateGlossary("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["key"] = "", +}); +Response response = client.PartialUpdateGlossary("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -7660,8 +6199,8 @@ Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validity Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -7670,18 +6209,28 @@ Console.WriteLine(result.GetProperty("qualifiedName").ToString()); Console.WriteLine(result.GetProperty("shortDescription").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryTermsAsync with required parameters and parse the result. + +This sample shows how to call GetGlossaryTermsAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryTermsAsync("", true, 1234, 1234, "", new RequestContext()); +Response response = await client.GetGlossaryTermsAsync("", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryTermsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossaryTermsAsync("", true, 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -7704,20 +6253,20 @@ Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -7828,8 +6377,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -7838,18 +6387,28 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryTerms with required parameters and parse the result. + +This sample shows how to call GetGlossaryTerms and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossaryTerms("", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryTerms with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaryTerms("", true, 1234, 1234, "", new RequestContext()); +Response response = client.GetGlossaryTerms("", true, 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -7872,20 +6431,20 @@ Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -7996,8 +6555,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -8006,18 +6565,28 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryTermHeadersAsync with required parameters and parse the result. + +This sample shows how to call GetGlossaryTermHeadersAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetGlossaryTermHeadersAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryTermHeadersAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetGlossaryTermHeadersAsync("", 1234, 1234, "", new RequestContext()); +Response response = await client.GetGlossaryTermHeadersAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -8028,18 +6597,28 @@ Console.WriteLine(result[0].GetProperty("source").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("steward").ToString()); Console.WriteLine(result[0].GetProperty("termGuid").ToString()); -]]> - +]]> - -This sample shows how to call GetGlossaryTermHeaders with required parameters and parse the result. + +This sample shows how to call GetGlossaryTermHeaders and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetGlossaryTermHeaders("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetGlossaryTermHeaders with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetGlossaryTermHeaders("", 1234, 1234, "", new RequestContext()); +Response response = client.GetGlossaryTermHeaders("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -8050,18 +6629,28 @@ Console.WriteLine(result[0].GetProperty("source").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("steward").ToString()); Console.WriteLine(result[0].GetProperty("termGuid").ToString()); -]]> - +]]> - -This sample shows how to call GetImportCsvOperationStatusAsync with required parameters and parse the result. + +This sample shows how to call GetImportCsvOperationStatusAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetImportCsvOperationStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetImportCsvOperationStatusAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetImportCsvOperationStatusAsync("", new RequestContext()); +Response response = await client.GetImportCsvOperationStatusAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -8072,18 +6661,28 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("importedTerms"). Console.WriteLine(result.GetProperty("properties").GetProperty("totalTermsDetected").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorCode").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorMessage").ToString()); -]]> - +]]> - -This sample shows how to call GetImportCsvOperationStatus with required parameters and parse the result. + +This sample shows how to call GetImportCsvOperationStatus and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetImportCsvOperationStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetImportCsvOperationStatus with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetImportCsvOperationStatus("", new RequestContext()); +Response response = client.GetImportCsvOperationStatus("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -8094,86 +6693,94 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("importedTerms"). Console.WriteLine(result.GetProperty("properties").GetProperty("totalTermsDetected").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorCode").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorMessage").ToString()); -]]> - +]]> - -This sample shows how to call ExportGlossaryTermsAsCsvAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call ExportGlossaryTermsAsCsvAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.ExportGlossaryTermsAsCsvAsync("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.ExportGlossaryTermsAsCsvAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ExportGlossaryTermsAsCsvAsync with all parameters and request content, and how to parse the result. +This sample shows how to call ExportGlossaryTermsAsCsvAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new[] { - "" -}; - -Response response = await client.ExportGlossaryTermsAsCsvAsync("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = await client.ExportGlossaryTermsAsCsvAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> - +]]> - -This sample shows how to call ExportGlossaryTermsAsCsv with required parameters and request content, and how to parse the result. + +This sample shows how to call ExportGlossaryTermsAsCsv and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -var data = new[] { - "" -}; - -Response response = client.ExportGlossaryTermsAsCsv("", RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.ExportGlossaryTermsAsCsv("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ExportGlossaryTermsAsCsv with all parameters and request content, and how to parse the result. +This sample shows how to call ExportGlossaryTermsAsCsv with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = new[] { - "" -}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.ExportGlossaryTermsAsCsv("", RequestContent.Create(data), true); +RequestContent content = RequestContent.Create(new List() +{ +"" +}); +Response response = client.ExportGlossaryTermsAsCsv("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); -]]> - +]]> - -This sample shows how to call GetTermsByGlossaryNameAsync with required parameters and parse the result. + +This sample shows how to call GetTermsByGlossaryNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = await client.GetTermsByGlossaryNameAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTermsByGlossaryNameAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = await client.GetTermsByGlossaryNameAsync("", 1234, 1234, true, new RequestContext()); +Response response = await client.GetTermsByGlossaryNameAsync("", 1234, 1234, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -8196,20 +6803,20 @@ Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -8320,8 +6927,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -8330,18 +6937,28 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call GetTermsByGlossaryName with required parameters and parse the result. + +This sample shows how to call GetTermsByGlossaryName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + +Response response = client.GetTermsByGlossaryName("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTermsByGlossaryName with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); -Response response = client.GetTermsByGlossaryName("", 1234, 1234, true, new RequestContext()); +Response response = client.GetTermsByGlossaryName("", 1234, 1234, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -8364,20 +6981,20 @@ Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); -Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); -Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -8488,8 +7105,8 @@ Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("valid Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -8498,36 +7115,33 @@ Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); -]]> - +]]> - -This sample shows how to call ImportGlossaryTermsViaCsvAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call ImportGlossaryTermsViaCsvAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ImportGlossaryTermsViaCsvAsync with all parameters and request content, and how to parse the result. +This sample shows how to call ImportGlossaryTermsViaCsvAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", RequestContent.Create(data), true); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -8537,36 +7151,33 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("importedTerms"). Console.WriteLine(result.GetProperty("properties").GetProperty("totalTermsDetected").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorCode").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorMessage").ToString()); -]]> - +]]> - -This sample shows how to call ImportGlossaryTermsViaCsv with required parameters and request content, and how to parse the result. + +This sample shows how to call ImportGlossaryTermsViaCsv and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ImportGlossaryTermsViaCsv with all parameters and request content, and how to parse the result. +This sample shows how to call ImportGlossaryTermsViaCsv with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", RequestContent.Create(data), true); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -8576,36 +7187,33 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("importedTerms"). Console.WriteLine(result.GetProperty("properties").GetProperty("totalTermsDetected").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorCode").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorMessage").ToString()); -]]> - +]]> - -This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryNameAsync with required parameters and request content, and how to parse the result. + +This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryNameAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryNameAsync with all parameters and request content, and how to parse the result. +This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryNameAsync with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", RequestContent.Create(data), true); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -8615,36 +7223,33 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("importedTerms"). Console.WriteLine(result.GetProperty("properties").GetProperty("totalTermsDetected").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorCode").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorMessage").ToString()); -]]> - +]]> - -This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryName with required parameters and request content, and how to parse the result. + +This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryName and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryName with all parameters and request content, and how to parse the result. +This sample shows how to call ImportGlossaryTermsViaCsvByGlossaryName with all parameters and request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - -var data = File.OpenRead(""); - -var operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", RequestContent.Create(data), true); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); +RequestContent content = RequestContent.Create(File.OpenRead("")); +Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -8654,8 +7259,7 @@ Console.WriteLine(result.GetProperty("properties").GetProperty("importedTerms"). Console.WriteLine(result.GetProperty("properties").GetProperty("totalTermsDetected").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorCode").ToString()); Console.WriteLine(result.GetProperty("error").GetProperty("errorMessage").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewLineages.xml b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewLineages.xml index 1b4c6b57c4da..e7faec16ba08 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewLineages.xml +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewLineages.xml @@ -2,49 +2,60 @@ - -This sample shows how to call GetLineageGraphAsync with required parameters and parse the result. + +This sample shows how to call GetLineageGraphAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); -Response response = await client.GetLineageGraphAsync("", "", 1234, 1234, true, true, new RequestContext()); +Response response = await client.GetLineageGraphAsync("", "BOTH", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLineageGraphAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + +Response response = await client.GetLineageGraphAsync("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -56,53 +67,63 @@ Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEn Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); -]]> - +]]> - -This sample shows how to call GetLineageGraph with required parameters and parse the result. + +This sample shows how to call GetLineageGraph and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + +Response response = client.GetLineageGraph("", "BOTH", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLineageGraph with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); -Response response = client.GetLineageGraph("", "", 1234, 1234, true, true, new RequestContext()); +Response response = client.GetLineageGraph("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -114,53 +135,63 @@ Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEn Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); -]]> - +]]> - -This sample shows how to call NextPageLineageAsync with required parameters and parse the result. + +This sample shows how to call NextPageLineageAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); -Response response = await client.NextPageLineageAsync("", "", true, 1234, 1234, new RequestContext()); +Response response = await client.NextPageLineageAsync("", "BOTH", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call NextPageLineageAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + +Response response = await client.NextPageLineageAsync("", "BOTH", true, 1234, 1234, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -172,53 +203,63 @@ Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEn Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); -]]> - +]]> - -This sample shows how to call NextPageLineage with required parameters and parse the result. + +This sample shows how to call NextPageLineage and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); -Response response = client.NextPageLineage("", "", true, 1234, 1234, new RequestContext()); +Response response = client.NextPageLineage("", "BOTH", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call NextPageLineage with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + +Response response = client.NextPageLineage("", "BOTH", true, 1234, 1234, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -230,53 +271,63 @@ Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEn Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); -]]> - +]]> - -This sample shows how to call GetLineageByUniqueAttributeAsync with required parameters and parse the result. + +This sample shows how to call GetLineageByUniqueAttributeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + +Response response = await client.GetLineageByUniqueAttributeAsync("", "BOTH", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLineageByUniqueAttributeAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); -Response response = await client.GetLineageByUniqueAttributeAsync("", "", 1234, 1234, true, true, new RequestContext()); +Response response = await client.GetLineageByUniqueAttributeAsync("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -288,53 +339,63 @@ Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEn Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); -]]> - +]]> - -This sample shows how to call GetLineageByUniqueAttribute with required parameters and parse the result. + +This sample shows how to call GetLineageByUniqueAttribute and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); -Response response = client.GetLineageByUniqueAttribute("", "", 1234, 1234, true, true, new RequestContext()); +Response response = client.GetLineageByUniqueAttribute("", "BOTH", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLineageByUniqueAttribute with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + +Response response = client.GetLineageByUniqueAttribute("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -346,8 +407,7 @@ Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEn Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewRelationships.xml b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewRelationships.xml index 87eb635d0750..20430fdd0c4a 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewRelationships.xml +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewRelationships.xml @@ -2,121 +2,66 @@ - + This sample shows how to call CreateAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -var data = new {}; - -Response response = await client.CreateAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateAsync with all request content, and how to parse the result. +This sample shows how to call CreateAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -var data = new { - createTime = 123.45f, - createdBy = "", - end1 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["end1"] = new Dictionary() + { + ["guid"] = "", + ["typeName"] = "", + ["uniqueAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - end2 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, + ["end2"] = null +, + ["guid"] = "", + ["homeId"] = "", + ["label"] = " - +]]> - + This sample shows how to call Create and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -var data = new {}; - -Response response = client.Create(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.Create(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call Create with all request content, and how to parse the result. +This sample shows how to call Create with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -var data = new { - createTime = 123.45f, - createdBy = "", - end1 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - }, - end2 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["end1"] = new Dictionary() + { + ["guid"] = "", + ["typeName"] = "", + ["uniqueAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - guid = "", - homeId = "", - label = " - +]]> - + This sample shows how to call UpdateAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -Response response = await client.UpdateAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateAsync with all request content, and how to parse the result. +This sample shows how to call UpdateAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -var data = new { - createTime = 123.45f, - createdBy = "", - end1 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - }, - end2 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["end1"] = new Dictionary() + { + ["guid"] = "", + ["typeName"] = "", + ["uniqueAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - guid = "", - homeId = "", - label = " - +]]> - + This sample shows how to call Update and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -Response response = client.Update(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.Update(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call Update with all request content, and how to parse the result. +This sample shows how to call Update with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -var data = new { - createTime = 123.45f, - createdBy = "", - end1 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - }, - end2 = new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["end1"] = new Dictionary() + { + ["guid"] = "", + ["typeName"] = "", + ["uniqueAttributes"] = new Dictionary() + { + ["key"] = new Dictionary(), }, }, - guid = "", - homeId = "", - label = " - +]]> - -This sample shows how to call GetPurviewRelationshipAsync with required parameters and parse the result. + +This sample shows how to call GetPurviewRelationshipAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -Response response = await client.GetPurviewRelationshipAsync("", true, new RequestContext()); +Response response = await client.GetPurviewRelationshipAsync("", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPurviewRelationshipAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); + +Response response = await client.GetPurviewRelationshipAsync("", true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("label").ToString()); @@ -579,62 +366,72 @@ Console.WriteLine(result.GetProperty("relationship").GetProperty("status").ToStr Console.WriteLine(result.GetProperty("relationship").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetPurviewRelationship with required parameters and parse the result. + +This sample shows how to call GetPurviewRelationship and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); -Response response = client.GetPurviewRelationship("", true, new RequestContext()); +Response response = client.GetPurviewRelationship("", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPurviewRelationship with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); + +Response response = client.GetPurviewRelationship("", true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("createdBy").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("typeName").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("label").ToString()); @@ -643,37 +440,52 @@ Console.WriteLine(result.GetProperty("relationship").GetProperty("status").ToStr Console.WriteLine(result.GetProperty("relationship").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("version").ToString()); -Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationship").GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteAsync with required parameters. + +This sample shows how to call DeleteAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = await client.DeleteAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); + +Response response = await client.DeleteAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call Delete with required parameters. + +This sample shows how to call Delete. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); Response response = client.Delete(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call Delete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); + +Response response = client.Delete(""); +Console.WriteLine(response.Status); +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewTypes.xml b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewTypes.xml index b6068bd89646..7840a4f888d9 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewTypes.xml +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/Docs/PurviewTypes.xml @@ -2,18 +2,29 @@ - -This sample shows how to call GetBusinessMetadataDefByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetBusinessMetadataDefByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetBusinessMetadataDefByGuidAsync("", new RequestContext()); +Response response = await client.GetBusinessMetadataDefByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataDefByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetBusinessMetadataDefByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -22,7 +33,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -49,29 +60,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetBusinessMetadataDefByGuid with required parameters and parse the result. + +This sample shows how to call GetBusinessMetadataDefByGuid and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetBusinessMetadataDefByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataDefByGuid with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetBusinessMetadataDefByGuid("", new RequestContext()); +Response response = client.GetBusinessMetadataDefByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -80,7 +101,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -107,29 +128,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetBusinessMetadataDefByNameAsync with required parameters and parse the result. + +This sample shows how to call GetBusinessMetadataDefByNameAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetBusinessMetadataDefByNameAsync("", new RequestContext()); +Response response = await client.GetBusinessMetadataDefByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataDefByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetBusinessMetadataDefByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -138,7 +169,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -165,29 +196,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetBusinessMetadataDefByName with required parameters and parse the result. + +This sample shows how to call GetBusinessMetadataDefByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetBusinessMetadataDefByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataDefByName with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetBusinessMetadataDefByName("", new RequestContext()); +Response response = client.GetBusinessMetadataDefByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -196,7 +237,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -223,32 +264,42 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetClassificationDefByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetClassificationDefByGuidAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetClassificationDefByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationDefByGuidAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetClassificationDefByGuidAsync("", new RequestContext()); +Response response = await client.GetClassificationDefByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -257,7 +308,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -284,32 +335,42 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetClassificationDefByGuid with required parameters and parse the result. + +This sample shows how to call GetClassificationDefByGuid and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetClassificationDefByGuid("", new RequestContext()); +Response response = client.GetClassificationDefByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationDefByGuid with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetClassificationDefByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -318,7 +379,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -345,32 +406,42 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetClassificationDefByNameAsync with required parameters and parse the result. + +This sample shows how to call GetClassificationDefByNameAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetClassificationDefByNameAsync("", new RequestContext()); +Response response = await client.GetClassificationDefByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationDefByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetClassificationDefByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -379,7 +450,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -406,32 +477,42 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetClassificationDefByName with required parameters and parse the result. + +This sample shows how to call GetClassificationDefByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetClassificationDefByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationDefByName with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetClassificationDefByName("", new RequestContext()); +Response response = client.GetClassificationDefByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -440,7 +521,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -467,25 +548,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEntityDefinitionByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetEntityDefinitionByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetEntityDefinitionByGuidAsync("", new RequestContext()); +Response response = await client.GetEntityDefinitionByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityDefinitionByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetEntityDefinitionByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); @@ -493,7 +584,7 @@ Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -502,12 +593,12 @@ Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -516,7 +607,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -543,25 +634,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEntityDefinitionByGuid with required parameters and parse the result. + +This sample shows how to call GetEntityDefinitionByGuid and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetEntityDefinitionByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityDefinitionByGuid with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetEntityDefinitionByGuid("", new RequestContext()); +Response response = client.GetEntityDefinitionByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); @@ -569,7 +670,7 @@ Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -578,12 +679,12 @@ Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -592,7 +693,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -619,25 +720,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEntityDefinitionByNameAsync with required parameters and parse the result. + +This sample shows how to call GetEntityDefinitionByNameAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetEntityDefinitionByNameAsync("", new RequestContext()); +Response response = await client.GetEntityDefinitionByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityDefinitionByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetEntityDefinitionByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); @@ -645,7 +756,7 @@ Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -654,12 +765,12 @@ Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -668,7 +779,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -695,25 +806,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEntityDefinitionByName with required parameters and parse the result. + +This sample shows how to call GetEntityDefinitionByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetEntityDefinitionByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityDefinitionByName with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetEntityDefinitionByName("", new RequestContext()); +Response response = client.GetEntityDefinitionByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); @@ -721,7 +842,7 @@ Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -730,12 +851,12 @@ Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -744,7 +865,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -771,25 +892,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEnumDefByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetEnumDefByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetEnumDefByGuidAsync("", new RequestContext()); +Response response = await client.GetEnumDefByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumDefByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetEnumDefByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("defaultValue").ToString()); @@ -819,25 +950,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEnumDefByGuid with required parameters and parse the result. + +This sample shows how to call GetEnumDefByGuid and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetEnumDefByGuid("", new RequestContext()); +Response response = client.GetEnumDefByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumDefByGuid with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetEnumDefByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("defaultValue").ToString()); @@ -867,25 +1008,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEnumDefByNameAsync with required parameters and parse the result. + +This sample shows how to call GetEnumDefByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetEnumDefByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumDefByNameAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetEnumDefByNameAsync("", new RequestContext()); +Response response = await client.GetEnumDefByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("defaultValue").ToString()); @@ -915,25 +1066,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetEnumDefByName with required parameters and parse the result. + +This sample shows how to call GetEnumDefByName and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetEnumDefByName("", new RequestContext()); +Response response = client.GetEnumDefByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumDefByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetEnumDefByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("defaultValue").ToString()); @@ -963,25 +1124,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetRelationshipDefByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetRelationshipDefByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetRelationshipDefByGuidAsync("", new RequestContext()); +Response response = await client.GetRelationshipDefByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipDefByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetRelationshipDefByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); @@ -999,7 +1170,7 @@ Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1008,7 +1179,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1035,25 +1206,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetRelationshipDefByGuid with required parameters and parse the result. + +This sample shows how to call GetRelationshipDefByGuid and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetRelationshipDefByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipDefByGuid with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetRelationshipDefByGuid("", new RequestContext()); +Response response = client.GetRelationshipDefByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); @@ -1071,7 +1252,7 @@ Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1080,7 +1261,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1107,25 +1288,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetRelationshipDefByNameAsync with required parameters and parse the result. + +This sample shows how to call GetRelationshipDefByNameAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetRelationshipDefByNameAsync("", new RequestContext()); +Response response = await client.GetRelationshipDefByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipDefByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetRelationshipDefByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); @@ -1143,7 +1334,7 @@ Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1152,7 +1343,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1179,25 +1370,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetRelationshipDefByName with required parameters and parse the result. + +This sample shows how to call GetRelationshipDefByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetRelationshipDefByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipDefByName with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetRelationshipDefByName("", new RequestContext()); +Response response = client.GetRelationshipDefByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); @@ -1215,7 +1416,7 @@ Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1224,7 +1425,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1251,29 +1452,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetStructDefByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetStructDefByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetStructDefByGuidAsync("", new RequestContext()); +Response response = await client.GetStructDefByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructDefByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetStructDefByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1282,7 +1493,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1309,29 +1520,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetStructDefByGuid with required parameters and parse the result. + +This sample shows how to call GetStructDefByGuid and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetStructDefByGuid("", new RequestContext()); +Response response = client.GetStructDefByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructDefByGuid with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetStructDefByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1340,7 +1561,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1367,29 +1588,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetStructDefByNameAsync with required parameters and parse the result. + +This sample shows how to call GetStructDefByNameAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetStructDefByNameAsync("", new RequestContext()); +Response response = await client.GetStructDefByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructDefByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetStructDefByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1398,7 +1629,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1425,29 +1656,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetStructDefByName with required parameters and parse the result. + +This sample shows how to call GetStructDefByName and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetStructDefByName("", new RequestContext()); +Response response = client.GetStructDefByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructDefByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetStructDefByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1456,7 +1697,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1483,25 +1724,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetTypeDefinitionByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetTypeDefinitionByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetTypeDefinitionByGuidAsync("", new RequestContext()); +Response response = await client.GetTypeDefinitionByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinitionByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetTypeDefinitionByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("category").ToString()); @@ -1527,25 +1778,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetTypeDefinitionByGuid with required parameters and parse the result. + +This sample shows how to call GetTypeDefinitionByGuid and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetTypeDefinitionByGuid("", new RequestContext()); +Response response = client.GetTypeDefinitionByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinitionByGuid with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetTypeDefinitionByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("category").ToString()); @@ -1571,25 +1832,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetTypeDefinitionByNameAsync with required parameters and parse the result. + +This sample shows how to call GetTypeDefinitionByNameAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetTypeDefinitionByNameAsync("", new RequestContext()); +Response response = await client.GetTypeDefinitionByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinitionByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetTypeDefinitionByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("category").ToString()); @@ -1615,25 +1886,35 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetTypeDefinitionByName with required parameters and parse the result. + +This sample shows how to call GetTypeDefinitionByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetTypeDefinitionByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinitionByName with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetTypeDefinitionByName("", new RequestContext()); +Response response = client.GetTypeDefinitionByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("category").ToString()); @@ -1659,55 +1940,81 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call DeleteTypeByNameAsync with required parameters. + +This sample shows how to call DeleteTypeByNameAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = await client.DeleteTypeByNameAsync(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTypeByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.DeleteTypeByNameAsync(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call DeleteTypeByName with required parameters. + +This sample shows how to call DeleteTypeByName. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); Response response = client.DeleteTypeByName(""); Console.WriteLine(response.Status); ]]> - +This sample shows how to call DeleteTypeByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.DeleteTypeByName(""); +Console.WriteLine(response.Status); +]]> - -This sample shows how to call GetAllTypeDefinitionsAsync with required parameters and parse the result. + +This sample shows how to call GetAllTypeDefinitionsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetAllTypeDefinitionsAsync(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAllTypeDefinitionsAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetAllTypeDefinitionsAsync(true, "", new RequestContext()); +Response response = await client.GetAllTypeDefinitionsAsync(true, "enum", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1716,7 +2023,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("att Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1743,7 +2050,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dat Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); @@ -1754,7 +2061,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entit Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1763,7 +2070,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attri Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1790,7 +2097,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateF Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); @@ -1802,7 +2109,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -1811,12 +2118,12 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipA Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1825,7 +2132,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1852,7 +2159,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); @@ -1886,7 +2193,7 @@ Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter") Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); @@ -1908,7 +2215,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2 Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1917,7 +2224,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1944,7 +2251,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); @@ -1952,7 +2259,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updated Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -1961,7 +2268,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -1988,7 +2295,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); @@ -1996,7 +2303,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").T Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2005,7 +2312,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -2032,29 +2339,39 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetAllTypeDefinitions with required parameters and parse the result. + +This sample shows how to call GetAllTypeDefinitions and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetAllTypeDefinitions(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetAllTypeDefinitions with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetAllTypeDefinitions(true, "", new RequestContext()); +Response response = client.GetAllTypeDefinitions(true, "enum", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2063,7 +2380,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("att Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -2090,7 +2407,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dat Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); @@ -2101,7 +2418,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entit Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2110,7 +2427,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attri Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -2137,7 +2454,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateF Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); @@ -2149,7 +2466,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -2158,12 +2475,12 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipA Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2172,7 +2489,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -2199,7 +2516,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); @@ -2233,7 +2550,7 @@ Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter") Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); @@ -2255,7 +2572,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2 Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2264,7 +2581,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -2291,7 +2608,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); @@ -2299,7 +2616,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updated Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2308,7 +2625,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -2335,7 +2652,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); @@ -2343,7 +2660,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").T Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2352,7 +2669,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -2379,618 +2696,386 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call CreateTypeDefinitionsAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.CreateTypeDefinitionsAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.CreateTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateTypeDefinitionsAsync with all request content, and how to parse the result. +This sample shows how to call CreateTypeDefinitionsAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new { - businessMetadataDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - classificationDefs = new[] { - new { - entityTypes = new[] { - "" - }, - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - entityDefs = new[] { - new { - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - relationshipAttributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - enumDefs = new[] { - new { - defaultValue = "", - elementDefs = new[] { - new { - description = "", - ordinal = 123.45f, - value = "", - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - relationshipDefs = new[] { - new { - endDef1 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - endDef2 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - structDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - termTemplateDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, -}; - -Response response = await client.CreateTypeDefinitionsAsync(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["businessMetadataDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +new Dictionary() +{ +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +new Dictionary() +{ +["params"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["type"] = "", +} +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["calendar"] = 123.45F, +["dateInstance"] = null +, +["dateTimeInstance"] = null +, +["instance"] = null +, +["lenient"] = true, +["numberFormat"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["currency"] = "", +["currencyInstance"] = null +, +["groupingUsed"] = true, +["instance"] = null +, +["integerInstance"] = null +, +["maximumFractionDigits"] = 1234, +["maximumIntegerDigits"] = 1234, +["minimumFractionDigits"] = 1234, +["minimumIntegerDigits"] = 1234, +["numberInstance"] = null +, +["parseIntegerOnly"] = true, +["percentInstance"] = null +, +["roundingMode"] = "UP", +}, +["timeInstance"] = null +, +["timeZone"] = new Dictionary() +{ +["dstSavings"] = 1234, +["id"] = "", +["availableIds"] = new List() +{ +"" +}, +["default"] = null +, +["displayName"] = "", +["rawOffset"] = 1234, +}, +}, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["classificationDefs"] = new List() +{ +new Dictionary() +{ +["entityTypes"] = new List() +{ +"" +}, +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["entityDefs"] = new List() +{ +new Dictionary() +{ +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["relationshipAttributeDefs"] = new List() +{ +new Dictionary() +{ +["isLegacyAttribute"] = true, +["relationshipTypeName"] = "", +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +null +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["enumDefs"] = new List() +{ +new Dictionary() +{ +["defaultValue"] = "", +["elementDefs"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["ordinal"] = 123.45F, +["value"] = "", +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["relationshipDefs"] = new List() +{ +new Dictionary() +{ +["endDef1"] = new Dictionary() +{ +["cardinality"] = "SINGLE", +["description"] = "", +["isContainer"] = true, +["isLegacyAttribute"] = true, +["name"] = "", +["type"] = "", +}, +["endDef2"] = null +, +["relationshipCategory"] = "ASSOCIATION", +["relationshipLabel"] = "", +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["structDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["termTemplateDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, +}); +Response response = await client.CreateTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -2999,7 +3084,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("att Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -3026,7 +3111,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dat Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); @@ -3037,7 +3122,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entit Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -3046,7 +3131,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attri Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -3073,7 +3158,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateF Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); @@ -3085,7 +3170,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -3094,12 +3179,12 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipA Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -3108,7 +3193,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -3135,7 +3220,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); @@ -3169,7 +3254,7 @@ Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter") Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); @@ -3191,7 +3276,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2 Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -3200,7 +3285,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -3227,7 +3312,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); @@ -3235,7 +3320,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updated Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -3244,7 +3329,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -3271,7 +3356,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); @@ -3279,7 +3364,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").T Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -3288,7 +3373,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -3315,618 +3400,386 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call CreateTypeDefinitions and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -var data = new {}; - -Response response = client.CreateTypeDefinitions(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.CreateTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call CreateTypeDefinitions with all request content, and how to parse the result. +This sample shows how to call CreateTypeDefinitions with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new { - businessMetadataDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - classificationDefs = new[] { - new { - entityTypes = new[] { - "" - }, - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - entityDefs = new[] { - new { - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - relationshipAttributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - enumDefs = new[] { - new { - defaultValue = "", - elementDefs = new[] { - new { - description = "", - ordinal = 123.45f, - value = "", - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - relationshipDefs = new[] { - new { - endDef1 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - endDef2 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - structDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - termTemplateDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, -}; - -Response response = client.CreateTypeDefinitions(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["businessMetadataDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +new Dictionary() +{ +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +new Dictionary() +{ +["params"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["type"] = "", +} +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["calendar"] = 123.45F, +["dateInstance"] = null +, +["dateTimeInstance"] = null +, +["instance"] = null +, +["lenient"] = true, +["numberFormat"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["currency"] = "", +["currencyInstance"] = null +, +["groupingUsed"] = true, +["instance"] = null +, +["integerInstance"] = null +, +["maximumFractionDigits"] = 1234, +["maximumIntegerDigits"] = 1234, +["minimumFractionDigits"] = 1234, +["minimumIntegerDigits"] = 1234, +["numberInstance"] = null +, +["parseIntegerOnly"] = true, +["percentInstance"] = null +, +["roundingMode"] = "UP", +}, +["timeInstance"] = null +, +["timeZone"] = new Dictionary() +{ +["dstSavings"] = 1234, +["id"] = "", +["availableIds"] = new List() +{ +"" +}, +["default"] = null +, +["displayName"] = "", +["rawOffset"] = 1234, +}, +}, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["classificationDefs"] = new List() +{ +new Dictionary() +{ +["entityTypes"] = new List() +{ +"" +}, +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["entityDefs"] = new List() +{ +new Dictionary() +{ +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["relationshipAttributeDefs"] = new List() +{ +new Dictionary() +{ +["isLegacyAttribute"] = true, +["relationshipTypeName"] = "", +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +null +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["enumDefs"] = new List() +{ +new Dictionary() +{ +["defaultValue"] = "", +["elementDefs"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["ordinal"] = 123.45F, +["value"] = "", +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["relationshipDefs"] = new List() +{ +new Dictionary() +{ +["endDef1"] = new Dictionary() +{ +["cardinality"] = "SINGLE", +["description"] = "", +["isContainer"] = true, +["isLegacyAttribute"] = true, +["name"] = "", +["type"] = "", +}, +["endDef2"] = null +, +["relationshipCategory"] = "ASSOCIATION", +["relationshipLabel"] = "", +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["structDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["termTemplateDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, +}); +Response response = client.CreateTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -3935,7 +3788,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("att Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -3962,7 +3815,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dat Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); @@ -3973,7 +3826,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entit Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -3982,7 +3835,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attri Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -4009,7 +3862,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateF Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); @@ -4021,7 +3874,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -4030,12 +3883,12 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipA Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -4044,7 +3897,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -4071,7 +3924,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); @@ -4105,7 +3958,7 @@ Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter") Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); @@ -4127,7 +3980,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2 Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -4136,7 +3989,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -4163,7 +4016,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); @@ -4171,7 +4024,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updated Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -4180,7 +4033,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -4207,7 +4060,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); @@ -4215,7 +4068,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").T Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -4224,7 +4077,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -4251,618 +4104,386 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call UpdateAtlasTypeDefinitionsAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.UpdateAtlasTypeDefinitionsAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.UpdateAtlasTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateAtlasTypeDefinitionsAsync with all request content, and how to parse the result. +This sample shows how to call UpdateAtlasTypeDefinitionsAsync with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new { - businessMetadataDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - classificationDefs = new[] { - new { - entityTypes = new[] { - "" - }, - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - entityDefs = new[] { - new { - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - relationshipAttributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - enumDefs = new[] { - new { - defaultValue = "", - elementDefs = new[] { - new { - description = "", - ordinal = 123.45f, - value = "", - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - relationshipDefs = new[] { - new { - endDef1 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - endDef2 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - structDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - termTemplateDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, -}; - -Response response = await client.UpdateAtlasTypeDefinitionsAsync(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["businessMetadataDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +new Dictionary() +{ +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +new Dictionary() +{ +["params"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["type"] = "", +} +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["calendar"] = 123.45F, +["dateInstance"] = null +, +["dateTimeInstance"] = null +, +["instance"] = null +, +["lenient"] = true, +["numberFormat"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["currency"] = "", +["currencyInstance"] = null +, +["groupingUsed"] = true, +["instance"] = null +, +["integerInstance"] = null +, +["maximumFractionDigits"] = 1234, +["maximumIntegerDigits"] = 1234, +["minimumFractionDigits"] = 1234, +["minimumIntegerDigits"] = 1234, +["numberInstance"] = null +, +["parseIntegerOnly"] = true, +["percentInstance"] = null +, +["roundingMode"] = "UP", +}, +["timeInstance"] = null +, +["timeZone"] = new Dictionary() +{ +["dstSavings"] = 1234, +["id"] = "", +["availableIds"] = new List() +{ +"" +}, +["default"] = null +, +["displayName"] = "", +["rawOffset"] = 1234, +}, +}, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["classificationDefs"] = new List() +{ +new Dictionary() +{ +["entityTypes"] = new List() +{ +"" +}, +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["entityDefs"] = new List() +{ +new Dictionary() +{ +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["relationshipAttributeDefs"] = new List() +{ +new Dictionary() +{ +["isLegacyAttribute"] = true, +["relationshipTypeName"] = "", +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +null +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["enumDefs"] = new List() +{ +new Dictionary() +{ +["defaultValue"] = "", +["elementDefs"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["ordinal"] = 123.45F, +["value"] = "", +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["relationshipDefs"] = new List() +{ +new Dictionary() +{ +["endDef1"] = new Dictionary() +{ +["cardinality"] = "SINGLE", +["description"] = "", +["isContainer"] = true, +["isLegacyAttribute"] = true, +["name"] = "", +["type"] = "", +}, +["endDef2"] = null +, +["relationshipCategory"] = "ASSOCIATION", +["relationshipLabel"] = "", +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["structDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["termTemplateDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, +}); +Response response = await client.UpdateAtlasTypeDefinitionsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -4871,7 +4492,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("att Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -4898,7 +4519,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dat Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); @@ -4909,7 +4530,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entit Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -4918,7 +4539,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attri Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -4945,7 +4566,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateF Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); @@ -4957,7 +4578,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -4966,12 +4587,12 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipA Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -4980,7 +4601,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -5007,7 +4628,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); @@ -5041,7 +4662,7 @@ Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter") Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); @@ -5063,7 +4684,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2 Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -5072,7 +4693,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -5099,7 +4720,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); @@ -5107,7 +4728,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updated Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -5116,7 +4737,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -5143,7 +4764,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); @@ -5151,7 +4772,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").T Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -5160,7 +4781,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -5187,618 +4808,386 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call UpdateAtlasTypeDefinitions and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.UpdateAtlasTypeDefinitions(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.UpdateAtlasTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call UpdateAtlasTypeDefinitions with all request content, and how to parse the result. +This sample shows how to call UpdateAtlasTypeDefinitions with all request content and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new { - businessMetadataDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - classificationDefs = new[] { - new { - entityTypes = new[] { - "" - }, - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - entityDefs = new[] { - new { - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - relationshipAttributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - enumDefs = new[] { - new { - defaultValue = "", - elementDefs = new[] { - new { - description = "", - ordinal = 123.45f, - value = "", - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - relationshipDefs = new[] { - new { - endDef1 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - endDef2 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - structDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - termTemplateDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, -}; - -Response response = client.UpdateAtlasTypeDefinitions(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["businessMetadataDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +new Dictionary() +{ +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +new Dictionary() +{ +["params"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["type"] = "", +} +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["calendar"] = 123.45F, +["dateInstance"] = null +, +["dateTimeInstance"] = null +, +["instance"] = null +, +["lenient"] = true, +["numberFormat"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["currency"] = "", +["currencyInstance"] = null +, +["groupingUsed"] = true, +["instance"] = null +, +["integerInstance"] = null +, +["maximumFractionDigits"] = 1234, +["maximumIntegerDigits"] = 1234, +["minimumFractionDigits"] = 1234, +["minimumIntegerDigits"] = 1234, +["numberInstance"] = null +, +["parseIntegerOnly"] = true, +["percentInstance"] = null +, +["roundingMode"] = "UP", +}, +["timeInstance"] = null +, +["timeZone"] = new Dictionary() +{ +["dstSavings"] = 1234, +["id"] = "", +["availableIds"] = new List() +{ +"" +}, +["default"] = null +, +["displayName"] = "", +["rawOffset"] = 1234, +}, +}, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["classificationDefs"] = new List() +{ +new Dictionary() +{ +["entityTypes"] = new List() +{ +"" +}, +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["entityDefs"] = new List() +{ +new Dictionary() +{ +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["relationshipAttributeDefs"] = new List() +{ +new Dictionary() +{ +["isLegacyAttribute"] = true, +["relationshipTypeName"] = "", +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +null +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["enumDefs"] = new List() +{ +new Dictionary() +{ +["defaultValue"] = "", +["elementDefs"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["ordinal"] = 123.45F, +["value"] = "", +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["relationshipDefs"] = new List() +{ +new Dictionary() +{ +["endDef1"] = new Dictionary() +{ +["cardinality"] = "SINGLE", +["description"] = "", +["isContainer"] = true, +["isLegacyAttribute"] = true, +["name"] = "", +["type"] = "", +}, +["endDef2"] = null +, +["relationshipCategory"] = "ASSOCIATION", +["relationshipLabel"] = "", +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["structDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["termTemplateDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, +}); +Response response = client.UpdateAtlasTypeDefinitions(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -5807,7 +5196,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("att Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -5834,7 +5223,7 @@ Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dat Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); @@ -5845,7 +5234,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entit Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -5854,7 +5243,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attri Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -5881,7 +5270,7 @@ Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateF Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); @@ -5893,7 +5282,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); @@ -5902,12 +5291,12 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipA Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -5916,7 +5305,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -5943,7 +5332,7 @@ Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); @@ -5977,7 +5366,7 @@ Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter") Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); @@ -5999,7 +5388,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2 Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -6008,7 +5397,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -6035,7 +5424,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); @@ -6043,7 +5432,7 @@ Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updated Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -6052,7 +5441,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -6079,7 +5468,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); @@ -6087,7 +5476,7 @@ Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").T Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -6096,7 +5485,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -6123,1263 +5512,829 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFor Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - + This sample shows how to call DeleteTypeDefinitionsAsync. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -var data = new {}; - -Response response = await client.DeleteTypeDefinitionsAsync(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = await client.DeleteTypeDefinitionsAsync(content); Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTypeDefinitionsAsync with all request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new { - businessMetadataDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - classificationDefs = new[] { - new { - entityTypes = new[] { - "" - }, - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - entityDefs = new[] { - new { - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - relationshipAttributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - enumDefs = new[] { - new { - defaultValue = "", - elementDefs = new[] { - new { - description = "", - ordinal = 123.45f, - value = "", - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - relationshipDefs = new[] { - new { - endDef1 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - endDef2 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - structDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - termTemplateDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, -}; - -Response response = await client.DeleteTypeDefinitionsAsync(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["businessMetadataDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +new Dictionary() +{ +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +new Dictionary() +{ +["params"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["type"] = "", +} +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["calendar"] = 123.45F, +["dateInstance"] = null +, +["dateTimeInstance"] = null +, +["instance"] = null +, +["lenient"] = true, +["numberFormat"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["currency"] = "", +["currencyInstance"] = null +, +["groupingUsed"] = true, +["instance"] = null +, +["integerInstance"] = null +, +["maximumFractionDigits"] = 1234, +["maximumIntegerDigits"] = 1234, +["minimumFractionDigits"] = 1234, +["minimumIntegerDigits"] = 1234, +["numberInstance"] = null +, +["parseIntegerOnly"] = true, +["percentInstance"] = null +, +["roundingMode"] = "UP", +}, +["timeInstance"] = null +, +["timeZone"] = new Dictionary() +{ +["dstSavings"] = 1234, +["id"] = "", +["availableIds"] = new List() +{ +"" +}, +["default"] = null +, +["displayName"] = "", +["rawOffset"] = 1234, +}, +}, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["classificationDefs"] = new List() +{ +new Dictionary() +{ +["entityTypes"] = new List() +{ +"" +}, +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["entityDefs"] = new List() +{ +new Dictionary() +{ +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["relationshipAttributeDefs"] = new List() +{ +new Dictionary() +{ +["isLegacyAttribute"] = true, +["relationshipTypeName"] = "", +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +null +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["enumDefs"] = new List() +{ +new Dictionary() +{ +["defaultValue"] = "", +["elementDefs"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["ordinal"] = 123.45F, +["value"] = "", +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["relationshipDefs"] = new List() +{ +new Dictionary() +{ +["endDef1"] = new Dictionary() +{ +["cardinality"] = "SINGLE", +["description"] = "", +["isContainer"] = true, +["isLegacyAttribute"] = true, +["name"] = "", +["type"] = "", +}, +["endDef2"] = null +, +["relationshipCategory"] = "ASSOCIATION", +["relationshipLabel"] = "", +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["structDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["termTemplateDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, +}); +Response response = await client.DeleteTypeDefinitionsAsync(content); Console.WriteLine(response.Status); -]]> - +]]> - + This sample shows how to call DeleteTypeDefinitions. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new {}; +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.DeleteTypeDefinitions(RequestContent.Create(data)); +RequestContent content = RequestContent.Create(new Dictionary()); +Response response = client.DeleteTypeDefinitions(content); Console.WriteLine(response.Status); ]]> This sample shows how to call DeleteTypeDefinitions with all request content. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); - -var data = new { - businessMetadataDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - classificationDefs = new[] { - new { - entityTypes = new[] { - "" - }, - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - entityDefs = new[] { - new { - subTypes = new[] { - "" - }, - superTypes = new[] { - "" - }, - relationshipAttributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - enumDefs = new[] { - new { - defaultValue = "", - elementDefs = new[] { - new { - description = "", - ordinal = 123.45f, - value = "", - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - relationshipDefs = new[] { - new { - endDef1 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - endDef2 = new { - cardinality = "SINGLE", - description = "", - isContainer = true, - isLegacyAttribute = true, - name = "", - type = "", - }, - relationshipCategory = "ASSOCIATION", - relationshipLabel = "", - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - structDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, - termTemplateDefs = new[] { - new { - attributeDefs = new[] { - new { - isLegacyAttribute = true, - relationshipTypeName = "", - cardinality = "SINGLE", - constraints = new[] { - new { - @params = new { - key = new {}, - }, - type = "", - } - }, - defaultValue = "", - description = "", - includeInNotification = true, - isIndexable = true, - isOptional = true, - isUnique = true, - name = "", - options = new { - key = "", - }, - typeName = "", - valuesMaxCount = 1234, - valuesMinCount = 1234, - } - }, - category = "PRIMITIVE", - createTime = 123.45f, - createdBy = "", - dateFormatter = new { - availableLocales = new[] { - "" - }, - calendar = 123.45f, - lenient = true, - numberFormat = new { - availableLocales = new[] { - "" - }, - currency = "", - groupingUsed = true, - maximumFractionDigits = 1234, - maximumIntegerDigits = 1234, - minimumFractionDigits = 1234, - minimumIntegerDigits = 1234, - parseIntegerOnly = true, - roundingMode = "UP", - }, - timeZone = new { - dstSavings = 1234, - id = "", - availableIds = new[] { - "" - }, - displayName = "", - rawOffset = 1234, - }, - }, - description = "", - guid = "", - name = "", - options = new { - key = "", - }, - serviceType = "", - typeVersion = "", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - lastModifiedTS = "", - } - }, -}; - -Response response = client.DeleteTypeDefinitions(RequestContent.Create(data)); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +RequestContent content = RequestContent.Create(new Dictionary() +{ + ["businessMetadataDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +new Dictionary() +{ +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +new Dictionary() +{ +["params"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["type"] = "", +} +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["calendar"] = 123.45F, +["dateInstance"] = null +, +["dateTimeInstance"] = null +, +["instance"] = null +, +["lenient"] = true, +["numberFormat"] = new Dictionary() +{ +["availableLocales"] = new List() +{ +"" +}, +["currency"] = "", +["currencyInstance"] = null +, +["groupingUsed"] = true, +["instance"] = null +, +["integerInstance"] = null +, +["maximumFractionDigits"] = 1234, +["maximumIntegerDigits"] = 1234, +["minimumFractionDigits"] = 1234, +["minimumIntegerDigits"] = 1234, +["numberInstance"] = null +, +["parseIntegerOnly"] = true, +["percentInstance"] = null +, +["roundingMode"] = "UP", +}, +["timeInstance"] = null +, +["timeZone"] = new Dictionary() +{ +["dstSavings"] = 1234, +["id"] = "", +["availableIds"] = new List() +{ +"" +}, +["default"] = null +, +["displayName"] = "", +["rawOffset"] = 1234, +}, +}, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["classificationDefs"] = new List() +{ +new Dictionary() +{ +["entityTypes"] = new List() +{ +"" +}, +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["entityDefs"] = new List() +{ +new Dictionary() +{ +["subTypes"] = new List() +{ +"" +}, +["superTypes"] = new List() +{ +"" +}, +["relationshipAttributeDefs"] = new List() +{ +new Dictionary() +{ +["isLegacyAttribute"] = true, +["relationshipTypeName"] = "", +["cardinality"] = "SINGLE", +["constraints"] = new List() +{ +null +}, +["defaultValue"] = "", +["description"] = "", +["includeInNotification"] = true, +["isIndexable"] = true, +["isOptional"] = true, +["isUnique"] = true, +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["typeName"] = "", +["valuesMaxCount"] = 1234, +["valuesMinCount"] = 1234, +} +}, +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["enumDefs"] = new List() +{ +new Dictionary() +{ +["defaultValue"] = "", +["elementDefs"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["ordinal"] = 123.45F, +["value"] = "", +} +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["relationshipDefs"] = new List() +{ +new Dictionary() +{ +["endDef1"] = new Dictionary() +{ +["cardinality"] = "SINGLE", +["description"] = "", +["isContainer"] = true, +["isLegacyAttribute"] = true, +["name"] = "", +["type"] = "", +}, +["endDef2"] = null +, +["relationshipCategory"] = "ASSOCIATION", +["relationshipLabel"] = "", +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["structDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, + ["termTemplateDefs"] = new List() +{ +new Dictionary() +{ +["attributeDefs"] = new List() +{ +null +}, +["category"] = "PRIMITIVE", +["createTime"] = 123.45F, +["createdBy"] = "", +["dateFormatter"] = null +, +["description"] = "", +["guid"] = "", +["name"] = "", +["options"] = new Dictionary() +{ +["key"] = "", +}, +["serviceType"] = "", +["typeVersion"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["lastModifiedTS"] = "", +} +}, +}); +Response response = client.DeleteTypeDefinitions(content); Console.WriteLine(response.Status); -]]> - +]]> - -This sample shows how to call GetTypeDefinitionHeadersAsync with required parameters and parse the result. + +This sample shows how to call GetTypeDefinitionHeadersAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetTypeDefinitionHeadersAsync(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTypeDefinitionHeadersAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetTypeDefinitionHeadersAsync(true, "", new RequestContext()); +Response response = await client.GetTypeDefinitionHeadersAsync(true, "enum", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("category").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("name").ToString()); -]]> - +]]> - -This sample shows how to call GetTypeDefinitionHeaders with required parameters and parse the result. + +This sample shows how to call GetTypeDefinitionHeaders and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetTypeDefinitionHeaders(true, "", new RequestContext()); +Response response = client.GetTypeDefinitionHeaders(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTypeDefinitionHeaders with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetTypeDefinitionHeaders(true, "enum", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("category").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("name").ToString()); -]]> - +]]> - -This sample shows how to call GetTermTemplateDefByGuidAsync with required parameters and parse the result. + +This sample shows how to call GetTermTemplateDefByGuidAsync and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetTermTemplateDefByGuidAsync("", new RequestContext()); +Response response = await client.GetTermTemplateDefByGuidAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateDefByGuidAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetTermTemplateDefByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -7388,7 +6343,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -7415,29 +6370,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetTermTemplateDefByGuid with required parameters and parse the result. + +This sample shows how to call GetTermTemplateDefByGuid and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetTermTemplateDefByGuid("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateDefByGuid with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetTermTemplateDefByGuid("", new RequestContext()); +Response response = client.GetTermTemplateDefByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -7446,7 +6411,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -7473,29 +6438,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetTermTemplateDefByNameAsync with required parameters and parse the result. + +This sample shows how to call GetTermTemplateDefByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = await client.GetTermTemplateDefByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateDefByNameAsync with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = await client.GetTermTemplateDefByNameAsync("", new RequestContext()); +Response response = await client.GetTermTemplateDefByNameAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -7504,7 +6479,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -7531,29 +6506,39 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> - -This sample shows how to call GetTermTemplateDefByName with required parameters and parse the result. + +This sample shows how to call GetTermTemplateDefByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); + +Response response = client.GetTermTemplateDefByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateDefByName with all parameters and parse the result. "); -var client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); +Uri endpoint = new Uri(""); +TokenCredential credential = new DefaultAzureCredential(); +PurviewTypes client = new PurviewCatalogClient(endpoint, credential).GetPurviewTypesClient(); -Response response = client.GetTermTemplateDefByName("", new RequestContext()); +Response response = client.GetTermTemplateDefByName("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); @@ -7562,7 +6547,7 @@ Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexabl Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); @@ -7589,15 +6574,14 @@ Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").Ge Console.WriteLine(result.GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("serviceType").ToString()); Console.WriteLine(result.GetProperty("typeVersion").ToString()); Console.WriteLine(result.GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); -]]> - +]]> \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCatalogClient.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCatalogClient.cs index 5cdcfdec318c..daf4806fa5a6 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCatalogClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCatalogClient.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Catalog; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,13 +23,12 @@ public class Samples_PurviewCatalogClient [Ignore("Only validating compilation of examples")] public void Example_Search() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new { }; - - Response response = client.Search(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.Search(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -39,38 +38,36 @@ public void Example_Search() [Ignore("Only validating compilation of examples")] public void Example_Search_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keywords = "", - offset = 1234, - limit = 1234, - filter = new { }, - facets = new[] { - new { - count = 1234, - facet = "", - sort = new {}, - } - }, - taxonomySetting = new + ["keywords"] = "", + ["offset"] = 1234, + ["limit"] = 1234, + ["filter"] = new Dictionary(), + ["facets"] = new List() +{ +new Dictionary() +{ +["count"] = 1234, +["facet"] = "", +["sort"] = new Dictionary(), +} +}, + ["taxonomySetting"] = new Dictionary() { - assetTypes = new[] { - "" - }, - facet = new - { - count = 1234, - facet = "", - sort = new { }, - }, + ["assetTypes"] = new List() +{ +"" +}, + ["facet"] = null + , }, - }; - - Response response = client.Search(RequestContent.Create(data)); + }); + Response response = client.Search(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -116,13 +113,12 @@ public void Example_Search_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Search_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new { }; - - Response response = await client.SearchAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.SearchAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -132,38 +128,36 @@ public async Task Example_Search_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Search_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keywords = "", - offset = 1234, - limit = 1234, - filter = new { }, - facets = new[] { - new { - count = 1234, - facet = "", - sort = new {}, - } - }, - taxonomySetting = new + ["keywords"] = "", + ["offset"] = 1234, + ["limit"] = 1234, + ["filter"] = new Dictionary(), + ["facets"] = new List() +{ +new Dictionary() +{ +["count"] = 1234, +["facet"] = "", +["sort"] = new Dictionary(), +} +}, + ["taxonomySetting"] = new Dictionary() { - assetTypes = new[] { - "" - }, - facet = new - { - count = 1234, - facet = "", - sort = new { }, - }, + ["assetTypes"] = new List() +{ +"" +}, + ["facet"] = null + , }, - }; - - Response response = await client.SearchAsync(RequestContent.Create(data)); + }); + Response response = await client.SearchAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -209,13 +203,12 @@ public async Task Example_Search_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Suggest() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - Response response = client.Suggest(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -225,18 +218,17 @@ public void Example_Suggest() [Ignore("Only validating compilation of examples")] public void Example_Suggest_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keywords = "", - limit = 1234, - filter = new { }, - }; - - Response response = client.Suggest(RequestContent.Create(data)); + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), + }); + Response response = client.Suggest(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); @@ -262,13 +254,12 @@ public void Example_Suggest_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Suggest_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - Response response = await client.SuggestAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -278,18 +269,17 @@ public async Task Example_Suggest_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Suggest_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keywords = "", - limit = 1234, - filter = new { }, - }; - - Response response = await client.SuggestAsync(RequestContent.Create(data)); + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), + }); + Response response = await client.SuggestAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); @@ -315,13 +305,12 @@ public async Task Example_Suggest_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_Browse() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - Response response = client.Browse(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.Browse(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -331,19 +320,18 @@ public void Example_Browse() [Ignore("Only validating compilation of examples")] public void Example_Browse_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entityType = "", - path = "", - limit = 1234, - offset = 1234, - }; - - Response response = client.Browse(RequestContent.Create(data)); + ["entityType"] = "", + ["path"] = "", + ["limit"] = 1234, + ["offset"] = 1234, + }); + Response response = client.Browse(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -363,13 +351,12 @@ public void Example_Browse_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_Browse_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new { }; - - Response response = await client.BrowseAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.BrowseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -379,19 +366,18 @@ public async Task Example_Browse_Async() [Ignore("Only validating compilation of examples")] public async Task Example_Browse_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entityType = "", - path = "", - limit = 1234, - offset = 1234, - }; - - Response response = await client.BrowseAsync(RequestContent.Create(data)); + ["entityType"] = "", + ["path"] = "", + ["limit"] = 1234, + ["offset"] = 1234, + }); + Response response = await client.BrowseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("@search.count").ToString()); @@ -411,13 +397,12 @@ public async Task Example_Browse_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AutoComplete() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - Response response = client.AutoComplete(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -427,18 +412,17 @@ public void Example_AutoComplete() [Ignore("Only validating compilation of examples")] public void Example_AutoComplete_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keywords = "", - limit = 1234, - filter = new { }, - }; - - Response response = client.AutoComplete(RequestContent.Create(data)); + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), + }); + Response response = client.AutoComplete(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); @@ -449,13 +433,12 @@ public void Example_AutoComplete_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AutoComplete_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - Response response = await client.AutoCompleteAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -465,18 +448,17 @@ public async Task Example_AutoComplete_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AutoComplete_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCatalogClient client = new PurviewCatalogClient(endpoint, credential); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - keywords = "", - limit = 1234, - filter = new { }, - }; - - Response response = await client.AutoCompleteAsync(RequestContent.Create(data)); + ["keywords"] = "", + ["limit"] = 1234, + ["filter"] = new Dictionary(), + }); + Response response = await client.AutoCompleteAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCollections.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCollections.cs index 68469ca6f627..6b7beb1a7906 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCollections.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewCollections.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Catalog; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,13 +23,12 @@ internal class Samples_PurviewCollections [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEntity() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new { }; - - Response response = client.CreateOrUpdateEntity("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateEntity("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -39,224 +38,150 @@ public void Example_CreateOrUpdateEntity() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEntity_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entity = new + ["entity"] = new Dictionary() { - businessAttributes = new + ["businessAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() { - key = "", + ["key"] = "", }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new + ["key"] = new Dictionary(), + }, + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - contacts = new + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, + ["key"] = null + , }, - }; - - Response response = client.CreateOrUpdateEntity("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateEntity("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -265,8 +190,8 @@ public void Example_CreateOrUpdateEntity_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -285,7 +210,7 @@ public void Example_CreateOrUpdateEntity_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -294,13 +219,12 @@ public void Example_CreateOrUpdateEntity_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEntity_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - Response response = await client.CreateOrUpdateEntityAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateEntityAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -310,224 +234,150 @@ public async Task Example_CreateOrUpdateEntity_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEntity_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entity = new + ["entity"] = new Dictionary() { - businessAttributes = new + ["businessAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() { - key = "", + ["key"] = "", }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new + ["key"] = new Dictionary(), + }, + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - contacts = new + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } + ["key"] = null + , }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, - }, - }; - - Response response = await client.CreateOrUpdateEntityAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateEntityAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -536,8 +386,8 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -556,7 +406,7 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -565,13 +415,12 @@ public async Task Example_CreateOrUpdateEntity_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEntityInBulk() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - Response response = client.CreateOrUpdateEntityInBulk("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateEntityInBulk("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -581,219 +430,153 @@ public void Example_CreateOrUpdateEntityInBulk() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEntityInBulk_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - referredEntities = new + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } + ["key"] = null + , }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, - }, - }; - - Response response = client.CreateOrUpdateEntityInBulk("", RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateEntityInBulk("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -802,8 +585,8 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -822,7 +605,7 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -831,13 +614,12 @@ public void Example_CreateOrUpdateEntityInBulk_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEntityInBulk_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new { }; - - Response response = await client.CreateOrUpdateEntityInBulkAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -847,219 +629,153 @@ public async Task Example_CreateOrUpdateEntityInBulk_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - referredEntities = new + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, + ["key"] = null + , }, - }; - - Response response = await client.CreateOrUpdateEntityInBulkAsync("", RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateEntityInBulkAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1068,8 +784,8 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1088,7 +804,7 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -1097,13 +813,12 @@ public async Task Example_CreateOrUpdateEntityInBulk_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_MoveEntitiesToCollection() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new { }; - - Response response = client.MoveEntitiesToCollection("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.MoveEntitiesToCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1113,52 +828,52 @@ public void Example_MoveEntitiesToCollection() [Ignore("Only validating compilation of examples")] public void Example_MoveEntitiesToCollection_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entityGuids = new[] { - "" - }, - }; - - Response response = client.MoveEntitiesToCollection("", RequestContent.Create(data)); + ["entityGuids"] = new List() +{ +"" +}, + }); + Response response = client.MoveEntitiesToCollection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1167,8 +882,8 @@ public void Example_MoveEntitiesToCollection_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1187,7 +902,7 @@ public void Example_MoveEntitiesToCollection_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -1196,13 +911,12 @@ public void Example_MoveEntitiesToCollection_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_MoveEntitiesToCollection_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - Response response = await client.MoveEntitiesToCollectionAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.MoveEntitiesToCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1212,52 +926,52 @@ public async Task Example_MoveEntitiesToCollection_Async() [Ignore("Only validating compilation of examples")] public async Task Example_MoveEntitiesToCollection_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewCollections client = new PurviewCatalogClient(endpoint, credential).GetPurviewCollectionsClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entityGuids = new[] { - "" - }, - }; - - Response response = await client.MoveEntitiesToCollectionAsync("", RequestContent.Create(data)); + ["entityGuids"] = new List() +{ +"" +}, + }); + Response response = await client.MoveEntitiesToCollectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1266,8 +980,8 @@ public async Task Example_MoveEntitiesToCollection_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1286,7 +1000,7 @@ public async Task Example_MoveEntitiesToCollection_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewEntities.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewEntities.cs index 71737b156057..254209599ad6 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewEntities.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewEntities.cs @@ -11,6 +11,7 @@ using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Catalog; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,13 +24,12 @@ internal class Samples_PurviewEntities [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new { }; - - Response response = client.CreateOrUpdate(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -39,224 +39,150 @@ public void Example_CreateOrUpdate() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdate_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entity = new + ["entity"] = new Dictionary() { - businessAttributes = new + ["businessAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() { - key = "", + ["key"] = "", }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - contacts = new + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, + ["key"] = null + , }, - }; - - Response response = client.CreateOrUpdate(RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdate(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -265,8 +191,8 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -285,7 +211,7 @@ public void Example_CreateOrUpdate_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -294,13 +220,12 @@ public void Example_CreateOrUpdate_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.CreateOrUpdateAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -310,224 +235,150 @@ public async Task Example_CreateOrUpdate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entity = new + ["entity"] = new Dictionary() { - businessAttributes = new + ["businessAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() { - key = "", + ["key"] = "", }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - contacts = new + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } + ["key"] = null + , }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, - }, - }; - - Response response = await client.CreateOrUpdateAsync(RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -536,8 +387,8 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -556,7 +407,7 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -565,11 +416,14 @@ public async Task Example_CreateOrUpdate_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetByGuids() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByGuids(new string[] { "" }, true, true, new string[] { "" }, new RequestContext()); + Response response = client.GetByGuids(new List() +{ +"" +}, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -579,14 +433,20 @@ public void Example_GetByGuids() [Ignore("Only validating compilation of examples")] public void Example_GetByGuids_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByGuids(new string[] { "" }, true, true, new string[] { "" }, new RequestContext()); + Response response = client.GetByGuids(new List() +{ +"" +}, true, true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -594,13 +454,13 @@ public void Example_GetByGuids_AllParameters() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -617,72 +477,75 @@ public void Example_GetByGuids_AllParameters() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetByGuids_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByGuidsAsync(new string[] { "" }, true, true, new string[] { "" }, new RequestContext()); + Response response = await client.GetByGuidsAsync(new List() +{ +"" +}, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -692,14 +555,20 @@ public async Task Example_GetByGuids_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetByGuids_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByGuidsAsync(new string[] { "" }, true, true, new string[] { "" }, new RequestContext()); + Response response = await client.GetByGuidsAsync(new List() +{ +"" +}, true, true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -707,13 +576,13 @@ public async Task Example_GetByGuids_AllParameters_Async() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -730,74 +599,73 @@ public async Task Example_GetByGuids_AllParameters_Async() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEntities() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new { }; - - Response response = client.CreateOrUpdateEntities(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateOrUpdateEntities(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -807,219 +675,153 @@ public void Example_CreateOrUpdateEntities() [Ignore("Only validating compilation of examples")] public void Example_CreateOrUpdateEntities_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - referredEntities = new + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, + ["key"] = null + , }, - }; - - Response response = client.CreateOrUpdateEntities(RequestContent.Create(data)); + }); + Response response = client.CreateOrUpdateEntities(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1028,8 +830,8 @@ public void Example_CreateOrUpdateEntities_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1048,7 +850,7 @@ public void Example_CreateOrUpdateEntities_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -1057,13 +859,12 @@ public void Example_CreateOrUpdateEntities_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEntities_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.CreateOrUpdateEntitiesAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateOrUpdateEntitiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1073,219 +874,153 @@ public async Task Example_CreateOrUpdateEntities_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateOrUpdateEntities_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entities = new[] { - new { - businessAttributes = new { - key = new {}, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new { - key = new {}, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new { - key = new {}, - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - referredEntities = new + ["entities"] = new List() +{ +new Dictionary() +{ +["businessAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["customAttributes"] = new Dictionary() +{ +["key"] = "", +}, +["guid"] = "", +["homeId"] = "", +["isIncomplete"] = true, +["labels"] = new List() +{ +"" +}, +["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, +["provenanceType"] = 123.45F, +["proxy"] = true, +["relationshipAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["status"] = "ACTIVE", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["version"] = 123.45F, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } + ["key"] = null + , }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, - }, - }; - - Response response = await client.CreateOrUpdateEntitiesAsync(RequestContent.Create(data)); + }); + Response response = await client.CreateOrUpdateEntitiesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1294,8 +1029,8 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1314,7 +1049,7 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -1323,11 +1058,14 @@ public async Task Example_CreateOrUpdateEntities_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteByGuids() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByGuids(new string[] { "" }, new RequestContext()); + Response response = client.DeleteByGuids(new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1337,45 +1075,48 @@ public void Example_DeleteByGuids() [Ignore("Only validating compilation of examples")] public void Example_DeleteByGuids_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByGuids(new string[] { "" }, new RequestContext()); + Response response = client.DeleteByGuids(new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1384,8 +1125,8 @@ public void Example_DeleteByGuids_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1404,7 +1145,7 @@ public void Example_DeleteByGuids_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -1413,11 +1154,14 @@ public void Example_DeleteByGuids_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteByGuids_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByGuidsAsync(new string[] { "" }, new RequestContext()); + Response response = await client.DeleteByGuidsAsync(new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1427,45 +1171,48 @@ public async Task Example_DeleteByGuids_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteByGuids_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByGuidsAsync(new string[] { "" }, new RequestContext()); + Response response = await client.DeleteByGuidsAsync(new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1474,8 +1221,8 @@ public async Task Example_DeleteByGuids_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1494,7 +1241,7 @@ public async Task Example_DeleteByGuids_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -1503,13 +1250,12 @@ public async Task Example_DeleteByGuids_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddClassification() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new { }; - - Response response = client.AddClassification(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.AddClassification(content); Console.WriteLine(response.Status); } @@ -1517,42 +1263,44 @@ public void Example_AddClassification() [Ignore("Only validating compilation of examples")] public void Example_AddClassification_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - classification = new + ["classification"] = new Dictionary() { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new + ["entityGuid"] = "", + ["entityStatus"] = "ACTIVE", + ["removePropagationsOnEntityDelete"] = true, + ["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - entityGuids = new[] { - "" - }, - }; - - Response response = client.AddClassification(RequestContent.Create(data)); + ["entityGuids"] = new List() +{ +"" +}, + }); + Response response = client.AddClassification(content); Console.WriteLine(response.Status); } @@ -1560,13 +1308,12 @@ public void Example_AddClassification_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddClassification_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.AddClassificationAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.AddClassificationAsync(content); Console.WriteLine(response.Status); } @@ -1574,42 +1321,44 @@ public async Task Example_AddClassification_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddClassification_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - classification = new + ["classification"] = new Dictionary() { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new + ["entityGuid"] = "", + ["entityStatus"] = "ACTIVE", + ["removePropagationsOnEntityDelete"] = true, + ["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - entityGuids = new[] { - "" - }, - }; - - Response response = await client.AddClassificationAsync(RequestContent.Create(data)); + ["entityGuids"] = new List() +{ +"" +}, + }); + Response response = await client.AddClassificationAsync(content); Console.WriteLine(response.Status); } @@ -1617,11 +1366,11 @@ public async Task Example_AddClassification_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetByGuid() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByGuid("", true, true, new RequestContext()); + Response response = client.GetByGuid("", null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1631,14 +1380,14 @@ public void Example_GetByGuid() [Ignore("Only validating compilation of examples")] public void Example_GetByGuid_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByGuid("", true, true, new RequestContext()); + Response response = client.GetByGuid("", true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -1646,13 +1395,13 @@ public void Example_GetByGuid_AllParameters() Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -1669,72 +1418,72 @@ public void Example_GetByGuid_AllParameters() Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetByGuid_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByGuidAsync("", true, true, new RequestContext()); + Response response = await client.GetByGuidAsync("", null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1744,14 +1493,14 @@ public async Task Example_GetByGuid_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetByGuid_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByGuidAsync("", true, true, new RequestContext()); + Response response = await client.GetByGuidAsync("", true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -1759,13 +1508,13 @@ public async Task Example_GetByGuid_AllParameters_Async() Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -1782,74 +1531,73 @@ public async Task Example_GetByGuid_AllParameters_Async() Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateEntityAttributeByGuid() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new { }; - - Response response = client.PartialUpdateEntityAttributeByGuid("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1859,47 +1607,46 @@ public void Example_PartialUpdateEntityAttributeByGuid() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateEntityAttributeByGuid_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.PartialUpdateEntityAttributeByGuid("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.PartialUpdateEntityAttributeByGuid("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -1908,8 +1655,8 @@ public void Example_PartialUpdateEntityAttributeByGuid_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -1928,7 +1675,7 @@ public void Example_PartialUpdateEntityAttributeByGuid_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -1937,13 +1684,12 @@ public void Example_PartialUpdateEntityAttributeByGuid_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateEntityAttributeByGuid_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new { }; - - Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1953,47 +1699,46 @@ public async Task Example_PartialUpdateEntityAttributeByGuid_Async() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateEntityAttributeByGuid_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.PartialUpdateEntityAttributeByGuidAsync("", "", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -2002,8 +1747,8 @@ public async Task Example_PartialUpdateEntityAttributeByGuid_AllParameters_Async Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -2022,7 +1767,7 @@ public async Task Example_PartialUpdateEntityAttributeByGuid_AllParameters_Async Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -2031,11 +1776,11 @@ public async Task Example_PartialUpdateEntityAttributeByGuid_AllParameters_Async [Ignore("Only validating compilation of examples")] public void Example_DeleteByGuid() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByGuid("", new RequestContext()); + Response response = client.DeleteByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2045,45 +1790,45 @@ public void Example_DeleteByGuid() [Ignore("Only validating compilation of examples")] public void Example_DeleteByGuid_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByGuid("", new RequestContext()); + Response response = client.DeleteByGuid("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -2092,8 +1837,8 @@ public void Example_DeleteByGuid_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -2112,7 +1857,7 @@ public void Example_DeleteByGuid_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -2121,11 +1866,11 @@ public void Example_DeleteByGuid_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteByGuid_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByGuidAsync("", new RequestContext()); + Response response = await client.DeleteByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2135,45 +1880,45 @@ public async Task Example_DeleteByGuid_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteByGuid_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByGuidAsync("", new RequestContext()); + Response response = await client.DeleteByGuidAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -2182,8 +1927,8 @@ public async Task Example_DeleteByGuid_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -2202,7 +1947,7 @@ public async Task Example_DeleteByGuid_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -2211,11 +1956,11 @@ public async Task Example_DeleteByGuid_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetClassification() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetClassification("", "", new RequestContext()); + Response response = client.GetClassification("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2225,11 +1970,11 @@ public void Example_GetClassification() [Ignore("Only validating compilation of examples")] public void Example_GetClassification_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetClassification("", "", new RequestContext()); + Response response = client.GetClassification("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityGuid").ToString()); @@ -2239,8 +1984,8 @@ public void Example_GetClassification_AllParameters() Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); } @@ -2249,11 +1994,11 @@ public void Example_GetClassification_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetClassification_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetClassificationAsync("", "", new RequestContext()); + Response response = await client.GetClassificationAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2263,11 +2008,11 @@ public async Task Example_GetClassification_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetClassification_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetClassificationAsync("", "", new RequestContext()); + Response response = await client.GetClassificationAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("entityGuid").ToString()); @@ -2277,8 +2022,8 @@ public async Task Example_GetClassification_AllParameters_Async() Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); } @@ -2287,9 +2032,9 @@ public async Task Example_GetClassification_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteClassification() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassification("", ""); Console.WriteLine(response.Status); @@ -2299,9 +2044,9 @@ public void Example_DeleteClassification() [Ignore("Only validating compilation of examples")] public void Example_DeleteClassification_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassification("", ""); Console.WriteLine(response.Status); @@ -2311,9 +2056,9 @@ public void Example_DeleteClassification_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteClassification_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationAsync("", ""); Console.WriteLine(response.Status); @@ -2323,9 +2068,9 @@ public async Task Example_DeleteClassification_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteClassification_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationAsync("", ""); Console.WriteLine(response.Status); @@ -2335,11 +2080,11 @@ public async Task Example_DeleteClassification_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetClassifications() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetClassifications("", new RequestContext()); + Response response = client.GetClassifications("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2349,11 +2094,11 @@ public void Example_GetClassifications() [Ignore("Only validating compilation of examples")] public void Example_GetClassifications_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetClassifications("", new RequestContext()); + Response response = client.GetClassifications("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("list")[0].ToString()); @@ -2368,11 +2113,11 @@ public void Example_GetClassifications_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetClassifications_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetClassificationsAsync("", new RequestContext()); + Response response = await client.GetClassificationsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2382,11 +2127,11 @@ public async Task Example_GetClassifications_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetClassifications_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetClassificationsAsync("", new RequestContext()); + Response response = await client.GetClassificationsAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("list")[0].ToString()); @@ -2401,15 +2146,15 @@ public async Task Example_GetClassifications_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddClassifications() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - new {} -}; - - Response response = client.AddClassifications("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.AddClassifications("", content); Console.WriteLine(response.Status); } @@ -2417,35 +2162,40 @@ public void Example_AddClassifications() [Ignore("Only validating compilation of examples")] public void Example_AddClassifications_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.AddClassifications("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = client.AddClassifications("", content); Console.WriteLine(response.Status); } @@ -2453,15 +2203,15 @@ public void Example_AddClassifications_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddClassifications_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - new {} -}; - - Response response = await client.AddClassificationsAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.AddClassificationsAsync("", content); Console.WriteLine(response.Status); } @@ -2469,35 +2219,40 @@ public async Task Example_AddClassifications_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddClassifications_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.AddClassificationsAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = await client.AddClassificationsAsync("", content); Console.WriteLine(response.Status); } @@ -2505,15 +2260,15 @@ public async Task Example_AddClassifications_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateClassifications() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - new {} -}; - - Response response = client.UpdateClassifications("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.UpdateClassifications("", content); Console.WriteLine(response.Status); } @@ -2521,35 +2276,40 @@ public void Example_UpdateClassifications() [Ignore("Only validating compilation of examples")] public void Example_UpdateClassifications_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.UpdateClassifications("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = client.UpdateClassifications("", content); Console.WriteLine(response.Status); } @@ -2557,15 +2317,15 @@ public void Example_UpdateClassifications_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateClassifications_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.UpdateClassificationsAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.UpdateClassificationsAsync("", content); Console.WriteLine(response.Status); } @@ -2573,35 +2333,40 @@ public async Task Example_UpdateClassifications_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateClassifications_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.UpdateClassificationsAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = await client.UpdateClassificationsAsync("", content); Console.WriteLine(response.Status); } @@ -2609,11 +2374,11 @@ public async Task Example_UpdateClassifications_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetByUniqueAttributes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByUniqueAttributes("", true, true, "", new RequestContext()); + Response response = client.GetByUniqueAttributes("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2623,14 +2388,14 @@ public void Example_GetByUniqueAttributes() [Ignore("Only validating compilation of examples")] public void Example_GetByUniqueAttributes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetByUniqueAttributes("", true, true, "", new RequestContext()); + Response response = client.GetByUniqueAttributes("", true, true, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -2638,13 +2403,13 @@ public void Example_GetByUniqueAttributes_AllParameters() Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -2661,72 +2426,72 @@ public void Example_GetByUniqueAttributes_AllParameters() Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetByUniqueAttributes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByUniqueAttributesAsync("", true, true, "", new RequestContext()); + Response response = await client.GetByUniqueAttributesAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2736,14 +2501,14 @@ public async Task Example_GetByUniqueAttributes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetByUniqueAttributes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetByUniqueAttributesAsync("", true, true, "", new RequestContext()); + Response response = await client.GetByUniqueAttributesAsync("", true, true, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -2751,13 +2516,13 @@ public async Task Example_GetByUniqueAttributes_AllParameters_Async() Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); @@ -2774,74 +2539,73 @@ public async Task Example_GetByUniqueAttributes_AllParameters_Async() Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateEntityByUniqueAttributes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.PartialUpdateEntityByUniqueAttributes("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.PartialUpdateEntityByUniqueAttributes("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2851,224 +2615,150 @@ public void Example_PartialUpdateEntityByUniqueAttributes() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entity = new + ["entity"] = new Dictionary() { - businessAttributes = new + ["businessAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() { - key = "", + ["key"] = "", }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - contacts = new + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, + ["key"] = null + , }, - }; - - Response response = client.PartialUpdateEntityByUniqueAttributes("", RequestContent.Create(data), ""); + }); + Response response = client.PartialUpdateEntityByUniqueAttributes("", content, attrQualifiedName: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -3077,8 +2767,8 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -3097,7 +2787,7 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -3106,13 +2796,12 @@ public void Example_PartialUpdateEntityByUniqueAttributes_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateEntityByUniqueAttributes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new { }; - - Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -3122,224 +2811,150 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - entity = new + ["entity"] = new Dictionary() { - businessAttributes = new + ["businessAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["customAttributes"] = new Dictionary() { - key = "", + ["key"] = "", }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new + ["guid"] = "", + ["homeId"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["provenanceType"] = 123.45F, + ["proxy"] = true, + ["relationshipAttributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new + ["status"] = "ACTIVE", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["version"] = 123.45F, + ["source"] = "", + ["sourceDetails"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - contacts = new + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, - referredEntities = new + ["referredEntities"] = new Dictionary() { - key = new - { - businessAttributes = new - { - key = new { }, - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - createTime = 123.45f, - createdBy = "", - customAttributes = new - { - key = "", - }, - guid = "", - homeId = "", - isIncomplete = true, - labels = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - provenanceType = 123.45f, - proxy = true, - relationshipAttributes = new - { - key = new { }, - }, - status = "ACTIVE", - updateTime = 123.45f, - updatedBy = "", - version = 123.45f, - source = "", - sourceDetails = new - { - key = new { }, - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } + ["key"] = null + , }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, - }, - }; - - Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", RequestContent.Create(data), ""); + }); + Response response = await client.PartialUpdateEntityByUniqueAttributesAsync("", content, attrQualifiedName: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -3348,8 +2963,8 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -3368,7 +2983,7 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -3377,11 +2992,11 @@ public async Task Example_PartialUpdateEntityByUniqueAttributes_AllParameters_As [Ignore("Only validating compilation of examples")] public void Example_DeleteByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByUniqueAttribute("", "", new RequestContext()); + Response response = client.DeleteByUniqueAttribute("", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -3391,45 +3006,45 @@ public void Example_DeleteByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_DeleteByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteByUniqueAttribute("", "", new RequestContext()); + Response response = client.DeleteByUniqueAttribute("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -3438,8 +3053,8 @@ public void Example_DeleteByUniqueAttribute_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -3458,7 +3073,7 @@ public void Example_DeleteByUniqueAttribute_AllParameters() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -3467,11 +3082,11 @@ public void Example_DeleteByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByUniqueAttributeAsync("", "", new RequestContext()); + Response response = await client.DeleteByUniqueAttributeAsync("", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -3481,45 +3096,45 @@ public async Task Example_DeleteByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteByUniqueAttributeAsync("", "", new RequestContext()); + Response response = await client.DeleteByUniqueAttributeAsync("", "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); @@ -3528,8 +3143,8 @@ public async Task Example_DeleteByUniqueAttribute_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); @@ -3548,7 +3163,7 @@ public async Task Example_DeleteByUniqueAttribute_AllParameters_Async() Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); } @@ -3557,9 +3172,9 @@ public async Task Example_DeleteByUniqueAttribute_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteClassificationByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = client.DeleteClassificationByUniqueAttribute("", ""); Console.WriteLine(response.Status); @@ -3569,11 +3184,11 @@ public void Example_DeleteClassificationByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_DeleteClassificationByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteClassificationByUniqueAttribute("", "", ""); + Response response = client.DeleteClassificationByUniqueAttribute("", "", attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -3581,9 +3196,9 @@ public void Example_DeleteClassificationByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteClassificationByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); Response response = await client.DeleteClassificationByUniqueAttributeAsync("", ""); Console.WriteLine(response.Status); @@ -3593,11 +3208,11 @@ public async Task Example_DeleteClassificationByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteClassificationByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteClassificationByUniqueAttributeAsync("", "", ""); + Response response = await client.DeleteClassificationByUniqueAttributeAsync("", "", attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -3605,15 +3220,15 @@ public async Task Example_DeleteClassificationByUniqueAttribute_AllParameters_As [Ignore("Only validating compilation of examples")] public void Example_AddClassificationsByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.AddClassificationsByUniqueAttribute("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.AddClassificationsByUniqueAttribute("", content); Console.WriteLine(response.Status); } @@ -3621,35 +3236,40 @@ public void Example_AddClassificationsByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_AddClassificationsByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.AddClassificationsByUniqueAttribute("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = client.AddClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -3657,15 +3277,15 @@ public void Example_AddClassificationsByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddClassificationsByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.AddClassificationsByUniqueAttributeAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); } @@ -3673,35 +3293,40 @@ public async Task Example_AddClassificationsByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddClassificationsByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.AddClassificationsByUniqueAttributeAsync("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -3709,15 +3334,15 @@ public async Task Example_AddClassificationsByUniqueAttribute_AllParameters_Asyn [Ignore("Only validating compilation of examples")] public void Example_UpdateClassificationsByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.UpdateClassificationsByUniqueAttribute("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.UpdateClassificationsByUniqueAttribute("", content); Console.WriteLine(response.Status); } @@ -3725,35 +3350,40 @@ public void Example_UpdateClassificationsByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_UpdateClassificationsByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.UpdateClassificationsByUniqueAttribute("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = client.UpdateClassificationsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -3761,15 +3391,15 @@ public void Example_UpdateClassificationsByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateClassificationsByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - new {} -}; - - Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); } @@ -3777,35 +3407,40 @@ public async Task Example_UpdateClassificationsByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateClassificationsByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}); + Response response = await client.UpdateClassificationsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -3813,13 +3448,12 @@ public async Task Example_UpdateClassificationsByUniqueAttribute_AllParameters_A [Ignore("Only validating compilation of examples")] public void Example_SetClassifications() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new { }; - - Response response = client.SetClassifications(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.SetClassifications(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -3829,77 +3463,87 @@ public void Example_SetClassifications() [Ignore("Only validating compilation of examples")] public void Example_SetClassifications_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - guidHeaderMap = new + ["guidHeaderMap"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - classificationNames = new[] { - "" - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new[] { - "" - }, - meaningNames = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - status = "ACTIVE", - attributes = new + ["classificationNames"] = new List() +{ +"" +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["displayText"] = "", + ["guid"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meaningNames"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["status"] = "ACTIVE", + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, }, - }; - - Response response = client.SetClassifications(RequestContent.Create(data)); + }); + Response response = client.SetClassifications(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -3909,13 +3553,12 @@ public void Example_SetClassifications_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_SetClassifications_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.SetClassificationsAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.SetClassificationsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -3925,77 +3568,87 @@ public async Task Example_SetClassifications_Async() [Ignore("Only validating compilation of examples")] public async Task Example_SetClassifications_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - guidHeaderMap = new + ["guidHeaderMap"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - classificationNames = new[] { - "" - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - displayText = "", - guid = "", - isIncomplete = true, - labels = new[] { - "" - }, - meaningNames = new[] { - "" - }, - meanings = new[] { - new { - confidence = 1234, - createdBy = "", - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DISCOVERED", - steward = "", - termGuid = "", - } - }, - status = "ACTIVE", - attributes = new + ["classificationNames"] = new List() +{ +"" +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["displayText"] = "", + ["guid"] = "", + ["isIncomplete"] = true, + ["labels"] = new List() +{ +"" +}, + ["meaningNames"] = new List() +{ +"" +}, + ["meanings"] = new List() +{ +new Dictionary() +{ +["confidence"] = 1234, +["createdBy"] = "", +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DISCOVERED", +["steward"] = "", +["termGuid"] = "", +} +}, + ["status"] = "ACTIVE", + ["attributes"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, - typeName = "", - lastModifiedTS = "", + ["typeName"] = "", + ["lastModifiedTS"] = "", }, }, - }; - - Response response = await client.SetClassificationsAsync(RequestContent.Create(data)); + }); + Response response = await client.SetClassificationsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -4005,11 +3658,11 @@ public async Task Example_SetClassifications_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetEntitiesByUniqueAttributes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetEntitiesByUniqueAttributes("", true, true, "", new RequestContext()); + Response response = client.GetEntitiesByUniqueAttributes("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4019,14 +3672,14 @@ public void Example_GetEntitiesByUniqueAttributes() [Ignore("Only validating compilation of examples")] public void Example_GetEntitiesByUniqueAttributes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetEntitiesByUniqueAttributes("", true, true, "", new RequestContext()); + Response response = client.GetEntitiesByUniqueAttributes("", true, true, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -4034,13 +3687,13 @@ public void Example_GetEntitiesByUniqueAttributes_AllParameters() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -4057,72 +3710,72 @@ public void Example_GetEntitiesByUniqueAttributes_AllParameters() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetEntitiesByUniqueAttributes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetEntitiesByUniqueAttributesAsync("", true, true, "", new RequestContext()); + Response response = await client.GetEntitiesByUniqueAttributesAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4132,14 +3785,14 @@ public async Task Example_GetEntitiesByUniqueAttributes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetEntitiesByUniqueAttributes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetEntitiesByUniqueAttributesAsync("", true, true, "", new RequestContext()); + Response response = await client.GetEntitiesByUniqueAttributesAsync("", true, true, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); @@ -4147,13 +3800,13 @@ public async Task Example_GetEntitiesByUniqueAttributes_AllParameters_Async() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); @@ -4170,72 +3823,72 @@ public async Task Example_GetEntitiesByUniqueAttributes_AllParameters_Async() Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetHeader() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetHeader("", new RequestContext()); + Response response = client.GetHeader("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4245,11 +3898,11 @@ public void Example_GetHeader() [Ignore("Only validating compilation of examples")] public void Example_GetHeader_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetHeader("", new RequestContext()); + Response response = client.GetHeader("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); @@ -4260,8 +3913,8 @@ public void Example_GetHeader_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("displayText").ToString()); @@ -4280,7 +3933,7 @@ public void Example_GetHeader_AllParameters() Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); } @@ -4289,11 +3942,11 @@ public void Example_GetHeader_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetHeader_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetHeaderAsync("", new RequestContext()); + Response response = await client.GetHeaderAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4303,11 +3956,11 @@ public async Task Example_GetHeader_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetHeader_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetHeaderAsync("", new RequestContext()); + Response response = await client.GetHeaderAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); @@ -4318,8 +3971,8 @@ public async Task Example_GetHeader_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("displayText").ToString()); @@ -4338,7 +3991,7 @@ public async Task Example_GetHeader_AllParameters_Async() Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); } @@ -4347,16 +4000,12 @@ public async Task Example_GetHeader_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteBusinessMetadata() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new - { - key = new { }, - }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteBusinessMetadata("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.DeleteBusinessMetadata("", content); Console.WriteLine(response.Status); } @@ -4364,16 +4013,15 @@ public void Example_DeleteBusinessMetadata() [Ignore("Only validating compilation of examples")] public void Example_DeleteBusinessMetadata_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = client.DeleteBusinessMetadata("", RequestContent.Create(data)); + ["key"] = new Dictionary(), + }); + Response response = client.DeleteBusinessMetadata("", content); Console.WriteLine(response.Status); } @@ -4381,16 +4029,12 @@ public void Example_DeleteBusinessMetadata_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteBusinessMetadata_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new - { - key = new { }, - }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteBusinessMetadataAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.DeleteBusinessMetadataAsync("", content); Console.WriteLine(response.Status); } @@ -4398,16 +4042,15 @@ public async Task Example_DeleteBusinessMetadata_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteBusinessMetadata_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = await client.DeleteBusinessMetadataAsync("", RequestContent.Create(data)); + ["key"] = new Dictionary(), + }); + Response response = await client.DeleteBusinessMetadataAsync("", content); Console.WriteLine(response.Status); } @@ -4415,16 +4058,12 @@ public async Task Example_DeleteBusinessMetadata_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddOrUpdateBusinessMetadata() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new - { - key = new { }, - }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.AddOrUpdateBusinessMetadata("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.AddOrUpdateBusinessMetadata("", content); Console.WriteLine(response.Status); } @@ -4432,16 +4071,15 @@ public void Example_AddOrUpdateBusinessMetadata() [Ignore("Only validating compilation of examples")] public void Example_AddOrUpdateBusinessMetadata_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = client.AddOrUpdateBusinessMetadata("", RequestContent.Create(data), true); + ["key"] = new Dictionary(), + }); + Response response = client.AddOrUpdateBusinessMetadata("", content, isOverwrite: true); Console.WriteLine(response.Status); } @@ -4449,16 +4087,12 @@ public void Example_AddOrUpdateBusinessMetadata_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddOrUpdateBusinessMetadata_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new - { - key = new { }, - }; - - Response response = await client.AddOrUpdateBusinessMetadataAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); Console.WriteLine(response.Status); } @@ -4466,16 +4100,15 @@ public async Task Example_AddOrUpdateBusinessMetadata_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddOrUpdateBusinessMetadata_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = await client.AddOrUpdateBusinessMetadataAsync("", RequestContent.Create(data), true); + ["key"] = new Dictionary(), + }); + Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, isOverwrite: true); Console.WriteLine(response.Status); } @@ -4483,16 +4116,12 @@ public async Task Example_AddOrUpdateBusinessMetadata_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteBusinessMetadataAttributes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new - { - key = new { }, - }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteBusinessMetadataAttributes("", "", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.DeleteBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); } @@ -4500,16 +4129,15 @@ public void Example_DeleteBusinessMetadataAttributes() [Ignore("Only validating compilation of examples")] public void Example_DeleteBusinessMetadataAttributes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = client.DeleteBusinessMetadataAttributes("", "", RequestContent.Create(data)); + ["key"] = new Dictionary(), + }); + Response response = client.DeleteBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); } @@ -4517,16 +4145,12 @@ public void Example_DeleteBusinessMetadataAttributes_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteBusinessMetadataAttributes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new - { - key = new { }, - }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); } @@ -4534,16 +4158,15 @@ public async Task Example_DeleteBusinessMetadataAttributes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteBusinessMetadataAttributes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", RequestContent.Create(data)); + ["key"] = new Dictionary(), + }); + Response response = await client.DeleteBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); } @@ -4551,16 +4174,12 @@ public async Task Example_DeleteBusinessMetadataAttributes_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddOrUpdateBusinessMetadataAttributes() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new - { - key = new { }, - }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); } @@ -4568,16 +4187,15 @@ public void Example_AddOrUpdateBusinessMetadataAttributes() [Ignore("Only validating compilation of examples")] public void Example_AddOrUpdateBusinessMetadataAttributes_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", RequestContent.Create(data)); + ["key"] = new Dictionary(), + }); + Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); Console.WriteLine(response.Status); } @@ -4585,16 +4203,12 @@ public void Example_AddOrUpdateBusinessMetadataAttributes_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddOrUpdateBusinessMetadataAttributes_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new - { - key = new { }, - }; - - Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); } @@ -4602,16 +4216,15 @@ public async Task Example_AddOrUpdateBusinessMetadataAttributes_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddOrUpdateBusinessMetadataAttributes_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = new { }, - }; - - Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", RequestContent.Create(data)); + ["key"] = new Dictionary(), + }); + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); Console.WriteLine(response.Status); } @@ -4619,14 +4232,14 @@ public async Task Example_AddOrUpdateBusinessMetadataAttributes_AllParameters_As [Ignore("Only validating compilation of examples")] public void Example_GetSampleBusinessMetadataTemplate() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetSampleBusinessMetadataTemplate(new RequestContext()); + Response response = client.GetSampleBusinessMetadataTemplate(null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -4637,14 +4250,14 @@ public void Example_GetSampleBusinessMetadataTemplate() [Ignore("Only validating compilation of examples")] public void Example_GetSampleBusinessMetadataTemplate_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.GetSampleBusinessMetadataTemplate(new RequestContext()); + Response response = client.GetSampleBusinessMetadataTemplate(null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -4655,14 +4268,14 @@ public void Example_GetSampleBusinessMetadataTemplate_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetSampleBusinessMetadataTemplate_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetSampleBusinessMetadataTemplateAsync(new RequestContext()); + Response response = await client.GetSampleBusinessMetadataTemplateAsync(null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -4673,14 +4286,14 @@ public async Task Example_GetSampleBusinessMetadataTemplate_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetSampleBusinessMetadataTemplate_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.GetSampleBusinessMetadataTemplateAsync(new RequestContext()); + Response response = await client.GetSampleBusinessMetadataTemplateAsync(null); if (response.ContentStream != null) { - using (Stream outFileStream = File.OpenWrite("")) + using (Stream outFileStream = File.OpenWrite("")) { response.ContentStream.CopyTo(outFileStream); } @@ -4691,13 +4304,12 @@ public async Task Example_GetSampleBusinessMetadataTemplate_AllParameters_Async( [Ignore("Only validating compilation of examples")] public void Example_ImportBusinessMetadata() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = File.OpenRead(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.ImportBusinessMetadata(RequestContent.Create(data)); + RequestContent content = null; + Response response = client.ImportBusinessMetadata(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4707,13 +4319,12 @@ public void Example_ImportBusinessMetadata() [Ignore("Only validating compilation of examples")] public void Example_ImportBusinessMetadata_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = File.OpenRead(""); - - Response response = client.ImportBusinessMetadata(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Response response = client.ImportBusinessMetadata(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); @@ -4730,13 +4341,12 @@ public void Example_ImportBusinessMetadata_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_ImportBusinessMetadata_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = File.OpenRead(""); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.ImportBusinessMetadataAsync(RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.ImportBusinessMetadataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4746,13 +4356,12 @@ public async Task Example_ImportBusinessMetadata_Async() [Ignore("Only validating compilation of examples")] public async Task Example_ImportBusinessMetadata_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = File.OpenRead(""); - - Response response = await client.ImportBusinessMetadataAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Response response = await client.ImportBusinessMetadataAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); @@ -4769,15 +4378,12 @@ public async Task Example_ImportBusinessMetadata_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteLabels() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteLabels("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.DeleteLabels("", content); Console.WriteLine(response.Status); } @@ -4785,15 +4391,15 @@ public void Example_DeleteLabels() [Ignore("Only validating compilation of examples")] public void Example_DeleteLabels_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = client.DeleteLabels("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.DeleteLabels("", content); Console.WriteLine(response.Status); } @@ -4801,15 +4407,12 @@ public void Example_DeleteLabels_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteLabels_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = await client.DeleteLabelsAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.DeleteLabelsAsync("", content); Console.WriteLine(response.Status); } @@ -4817,15 +4420,15 @@ public async Task Example_DeleteLabels_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteLabels_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteLabelsAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.DeleteLabelsAsync("", content); Console.WriteLine(response.Status); } @@ -4833,15 +4436,12 @@ public async Task Example_DeleteLabels_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_SetLabels() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.SetLabels("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.SetLabels("", content); Console.WriteLine(response.Status); } @@ -4849,15 +4449,15 @@ public void Example_SetLabels() [Ignore("Only validating compilation of examples")] public void Example_SetLabels_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = client.SetLabels("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.SetLabels("", content); Console.WriteLine(response.Status); } @@ -4865,15 +4465,12 @@ public void Example_SetLabels_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_SetLabels_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = await client.SetLabelsAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.SetLabelsAsync("", content); Console.WriteLine(response.Status); } @@ -4881,15 +4478,15 @@ public async Task Example_SetLabels_Async() [Ignore("Only validating compilation of examples")] public async Task Example_SetLabels_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.SetLabelsAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.SetLabelsAsync("", content); Console.WriteLine(response.Status); } @@ -4897,15 +4494,12 @@ public async Task Example_SetLabels_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddLabel() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.AddLabel("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.AddLabel("", content); Console.WriteLine(response.Status); } @@ -4913,15 +4507,15 @@ public void Example_AddLabel() [Ignore("Only validating compilation of examples")] public void Example_AddLabel_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = client.AddLabel("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.AddLabel("", content); Console.WriteLine(response.Status); } @@ -4929,15 +4523,12 @@ public void Example_AddLabel_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddLabel_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = await client.AddLabelAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.AddLabelAsync("", content); Console.WriteLine(response.Status); } @@ -4945,15 +4536,15 @@ public async Task Example_AddLabel_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddLabel_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.AddLabelAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.AddLabelAsync("", content); Console.WriteLine(response.Status); } @@ -4961,15 +4552,12 @@ public async Task Example_AddLabel_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteLabelsByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.DeleteLabelsByUniqueAttribute("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.DeleteLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); } @@ -4977,15 +4565,15 @@ public void Example_DeleteLabelsByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_DeleteLabelsByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = client.DeleteLabelsByUniqueAttribute("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.DeleteLabelsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -4993,15 +4581,12 @@ public void Example_DeleteLabelsByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteLabelsByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = await client.DeleteLabelsByUniqueAttributeAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); } @@ -5009,15 +4594,15 @@ public async Task Example_DeleteLabelsByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteLabelsByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.DeleteLabelsByUniqueAttributeAsync("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.DeleteLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -5025,15 +4610,12 @@ public async Task Example_DeleteLabelsByUniqueAttribute_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_SetLabelsByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.SetLabelsByUniqueAttribute("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.SetLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); } @@ -5041,15 +4623,15 @@ public void Example_SetLabelsByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_SetLabelsByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = client.SetLabelsByUniqueAttribute("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.SetLabelsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -5057,15 +4639,12 @@ public void Example_SetLabelsByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_SetLabelsByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = await client.SetLabelsByUniqueAttributeAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.SetLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); } @@ -5073,15 +4652,15 @@ public async Task Example_SetLabelsByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_SetLabelsByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.SetLabelsByUniqueAttributeAsync("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -5089,15 +4668,12 @@ public async Task Example_SetLabelsByUniqueAttribute_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_AddLabelsByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = client.AddLabelsByUniqueAttribute("", RequestContent.Create(data)); + RequestContent content = null; + Response response = client.AddLabelsByUniqueAttribute("", content); Console.WriteLine(response.Status); } @@ -5105,15 +4681,15 @@ public void Example_AddLabelsByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_AddLabelsByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = client.AddLabelsByUniqueAttribute("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.AddLabelsByUniqueAttribute("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } @@ -5121,15 +4697,12 @@ public void Example_AddLabelsByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AddLabelsByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - var data = new[] { - "" -}; - - Response response = await client.AddLabelsByUniqueAttributeAsync("", RequestContent.Create(data)); + RequestContent content = null; + Response response = await client.AddLabelsByUniqueAttributeAsync("", content); Console.WriteLine(response.Status); } @@ -5137,15 +4710,15 @@ public async Task Example_AddLabelsByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AddLabelsByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - - var data = new[] { - "" -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewEntities client = new PurviewCatalogClient(endpoint, credential).GetPurviewEntitiesClient(); - Response response = await client.AddLabelsByUniqueAttributeAsync("", RequestContent.Create(data), ""); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.AddLabelsByUniqueAttributeAsync("", content, attrQualifiedName: ""); Console.WriteLine(response.Status); } } diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewGlossaries.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewGlossaries.cs index 762a32794b0c..cf3840c4c8f9 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewGlossaries.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewGlossaries.cs @@ -11,6 +11,7 @@ using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Catalog; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +24,11 @@ internal class Samples_PurviewGlossaries [Ignore("Only validating compilation of examples")] public void Example_GetGlossaries() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaries(1234, 1234, "", true, new RequestContext()); + Response response = client.GetGlossaries(null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -37,11 +38,11 @@ public void Example_GetGlossaries() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaries_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaries(1234, 1234, "", true, new RequestContext()); + Response response = client.GetGlossaries(1234, 1234, "", true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -66,8 +67,8 @@ public void Example_GetGlossaries_AllParameters() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -82,11 +83,11 @@ public void Example_GetGlossaries_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaries_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossariesAsync(1234, 1234, "", true, new RequestContext()); + Response response = await client.GetGlossariesAsync(null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -96,11 +97,11 @@ public async Task Example_GetGlossaries_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaries_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossariesAsync(1234, 1234, "", true, new RequestContext()); + Response response = await client.GetGlossariesAsync(1234, 1234, "", true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -125,8 +126,8 @@ public async Task Example_GetGlossaries_AllParameters_Async() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -141,13 +142,12 @@ public async Task Example_GetGlossaries_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossary() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new { }; - - Response response = client.CreateGlossary(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateGlossary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -157,413 +157,76 @@ public void Example_CreateGlossary() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossary_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - categoryInfo = new - { - key = new - { - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new - { - key = new - { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new - { - key = new { }, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = client.CreateGlossary(RequestContent.Create(data)); + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = client.CreateGlossary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -588,8 +251,8 @@ public void Example_CreateGlossary_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -604,13 +267,12 @@ public void Example_CreateGlossary_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossary_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.CreateGlossaryAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateGlossaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -620,413 +282,76 @@ public async Task Example_CreateGlossary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossary_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - categoryInfo = new - { - key = new - { - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new - { - key = new - { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new - { - key = new { }, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = await client.CreateGlossaryAsync(RequestContent.Create(data)); + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = await client.CreateGlossaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -1051,8 +376,8 @@ public async Task Example_CreateGlossary_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1067,15 +392,15 @@ public async Task Example_CreateGlossary_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryCategories() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.CreateGlossaryCategories(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.CreateGlossaryCategories(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -1085,78 +410,85 @@ public void Example_CreateGlossaryCategories() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryCategories_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.CreateGlossaryCategories(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, +["parentCategory"] = null +, +["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); + Response response = client.CreateGlossaryCategories(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1187,8 +519,8 @@ public void Example_CreateGlossaryCategories_AllParameters() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -1203,15 +535,15 @@ public void Example_CreateGlossaryCategories_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryCategories_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.CreateGlossaryCategoriesAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.CreateGlossaryCategoriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -1221,78 +553,85 @@ public async Task Example_CreateGlossaryCategories_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryCategories_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.CreateGlossaryCategoriesAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, +["parentCategory"] = null +, +["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); + Response response = await client.CreateGlossaryCategoriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1323,8 +662,8 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -1339,13 +678,12 @@ public async Task Example_CreateGlossaryCategories_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryCategory() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.CreateGlossaryCategory(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateGlossaryCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1355,79 +693,82 @@ public void Example_CreateGlossaryCategory() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryCategory_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - anchor = new + ["anchor"] = new Dictionary() { - displayText = "", - glossaryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = client.CreateGlossaryCategory(RequestContent.Create(data)); + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null + , + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = client.CreateGlossaryCategory(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1458,8 +799,8 @@ public void Example_CreateGlossaryCategory_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1474,13 +815,12 @@ public void Example_CreateGlossaryCategory_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryCategory_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.CreateGlossaryCategoryAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateGlossaryCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1490,79 +830,82 @@ public async Task Example_CreateGlossaryCategory_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryCategory_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new + ["anchor"] = new Dictionary() { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = await client.CreateGlossaryCategoryAsync(RequestContent.Create(data)); + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null + , + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = await client.CreateGlossaryCategoryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1593,8 +936,8 @@ public async Task Example_CreateGlossaryCategory_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1609,11 +952,11 @@ public async Task Example_CreateGlossaryCategory_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryCategory() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryCategory("", new RequestContext()); + Response response = client.GetGlossaryCategory("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1623,11 +966,11 @@ public void Example_GetGlossaryCategory() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryCategory_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryCategory("", new RequestContext()); + Response response = client.GetGlossaryCategory("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1658,8 +1001,8 @@ public void Example_GetGlossaryCategory_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1674,11 +1017,11 @@ public void Example_GetGlossaryCategory_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryCategory_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryCategoryAsync("", new RequestContext()); + Response response = await client.GetGlossaryCategoryAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1688,11 +1031,11 @@ public async Task Example_GetGlossaryCategory_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryCategory_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryCategoryAsync("", new RequestContext()); + Response response = await client.GetGlossaryCategoryAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1723,8 +1066,8 @@ public async Task Example_GetGlossaryCategory_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1739,13 +1082,12 @@ public async Task Example_GetGlossaryCategory_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateGlossaryCategory() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new { }; - - Response response = client.UpdateGlossaryCategory("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.UpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1755,79 +1097,82 @@ public void Example_UpdateGlossaryCategory() [Ignore("Only validating compilation of examples")] public void Example_UpdateGlossaryCategory_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new + ["anchor"] = new Dictionary() { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = client.UpdateGlossaryCategory("", RequestContent.Create(data)); + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null + , + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = client.UpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1858,8 +1203,8 @@ public void Example_UpdateGlossaryCategory_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -1874,13 +1219,12 @@ public void Example_UpdateGlossaryCategory_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateGlossaryCategory_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.UpdateGlossaryCategoryAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.UpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -1890,79 +1234,82 @@ public async Task Example_UpdateGlossaryCategory_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateGlossaryCategory_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - anchor = new + ["anchor"] = new Dictionary() { - displayText = "", - glossaryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = await client.UpdateGlossaryCategoryAsync("", RequestContent.Create(data)); + ["childrenCategories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["parentCategory"] = null + , + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = await client.UpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -1993,8 +1340,8 @@ public async Task Example_UpdateGlossaryCategory_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -2009,9 +1356,9 @@ public async Task Example_UpdateGlossaryCategory_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteGlossaryCategory() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryCategory(""); Console.WriteLine(response.Status); @@ -2021,9 +1368,9 @@ public void Example_DeleteGlossaryCategory() [Ignore("Only validating compilation of examples")] public void Example_DeleteGlossaryCategory_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryCategory(""); Console.WriteLine(response.Status); @@ -2033,9 +1380,9 @@ public void Example_DeleteGlossaryCategory_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGlossaryCategory_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryCategoryAsync(""); Console.WriteLine(response.Status); @@ -2045,9 +1392,9 @@ public async Task Example_DeleteGlossaryCategory_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGlossaryCategory_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryCategoryAsync(""); Console.WriteLine(response.Status); @@ -2057,16 +1404,15 @@ public async Task Example_DeleteGlossaryCategory_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateGlossaryCategory() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = client.PartialUpdateGlossaryCategory("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = client.PartialUpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2076,16 +1422,15 @@ public void Example_PartialUpdateGlossaryCategory() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateGlossaryCategory_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = client.PartialUpdateGlossaryCategory("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = client.PartialUpdateGlossaryCategory("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -2116,8 +1461,8 @@ public void Example_PartialUpdateGlossaryCategory_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -2132,16 +1477,15 @@ public void Example_PartialUpdateGlossaryCategory_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateGlossaryCategory_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = await client.PartialUpdateGlossaryCategoryAsync("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = await client.PartialUpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2151,16 +1495,15 @@ public async Task Example_PartialUpdateGlossaryCategory_Async() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateGlossaryCategory_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = await client.PartialUpdateGlossaryCategoryAsync("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = await client.PartialUpdateGlossaryCategoryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); @@ -2191,8 +1534,8 @@ public async Task Example_PartialUpdateGlossaryCategory_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -2207,75 +1550,75 @@ public async Task Example_PartialUpdateGlossaryCategory_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetRelatedCategories() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetRelatedCategories("", 1234, 1234, "", new RequestContext()); + Response response = client.GetRelatedCategories("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetRelatedCategories_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetRelatedCategories("", 1234, 1234, "", new RequestContext()); + Response response = client.GetRelatedCategories("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetRelatedCategories_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetRelatedCategoriesAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetRelatedCategories_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetCategoryTerms() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetCategoryTerms("", 1234, 1234, "", new RequestContext()); + Response response = client.GetCategoryTerms("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -2285,11 +1628,11 @@ public void Example_GetCategoryTerms() [Ignore("Only validating compilation of examples")] public void Example_GetCategoryTerms_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetCategoryTerms("", 1234, 1234, "", new RequestContext()); + Response response = client.GetCategoryTerms("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -2306,11 +1649,11 @@ public void Example_GetCategoryTerms_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetCategoryTerms_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetCategoryTermsAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -2320,11 +1663,11 @@ public async Task Example_GetCategoryTerms_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetCategoryTerms_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -2341,13 +1684,12 @@ public async Task Example_GetCategoryTerms_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryTerm() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.CreateGlossaryTerm(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.CreateGlossaryTerm(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2357,285 +1699,195 @@ public void Example_CreateGlossaryTerm() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryTerm_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() { - displayText = "", - glossaryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = client.CreateGlossaryTerm(RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = client.CreateGlossaryTerm(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -2658,20 +1910,20 @@ public void Example_CreateGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -2782,8 +2034,8 @@ public void Example_CreateGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -2798,13 +2050,12 @@ public void Example_CreateGlossaryTerm_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryTerm_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new { }; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.CreateGlossaryTermAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.CreateGlossaryTermAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -2814,285 +2065,195 @@ public async Task Example_CreateGlossaryTerm_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryTerm_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() { - displayText = "", - glossaryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = await client.CreateGlossaryTermAsync(RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = await client.CreateGlossaryTermAsync(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -3115,20 +2276,20 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -3239,8 +2400,8 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -3255,11 +2416,11 @@ public async Task Example_CreateGlossaryTerm_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryTerm() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryTerm("", true, new string[] { "" }, new RequestContext()); + Response response = client.GetGlossaryTerm("", null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -3269,11 +2430,14 @@ public void Example_GetGlossaryTerm() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryTerm_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryTerm("", true, new string[] { "" }, new RequestContext()); + Response response = client.GetGlossaryTerm("", true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -3296,20 +2460,20 @@ public void Example_GetGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -3420,8 +2584,8 @@ public void Example_GetGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -3436,11 +2600,11 @@ public void Example_GetGlossaryTerm_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryTerm_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryTermAsync("", true, new string[] { "" }, new RequestContext()); + Response response = await client.GetGlossaryTermAsync("", null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -3450,11 +2614,14 @@ public async Task Example_GetGlossaryTerm_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryTerm_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryTermAsync("", true, new string[] { "" }, new RequestContext()); + Response response = await client.GetGlossaryTermAsync("", true, new List() +{ +"" +}, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -3477,20 +2644,20 @@ public async Task Example_GetGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -3601,8 +2768,8 @@ public async Task Example_GetGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -3617,13 +2784,12 @@ public async Task Example_GetGlossaryTerm_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateGlossaryTerm() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new { }; - - Response response = client.UpdateGlossaryTerm("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.UpdateGlossaryTerm("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -3633,285 +2799,195 @@ public void Example_UpdateGlossaryTerm() [Ignore("Only validating compilation of examples")] public void Example_UpdateGlossaryTerm_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() { - displayText = "", - glossaryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = client.UpdateGlossaryTerm("", RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = client.UpdateGlossaryTerm("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -3934,20 +3010,20 @@ public void Example_UpdateGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -4058,8 +3134,8 @@ public void Example_UpdateGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -4074,13 +3150,12 @@ public void Example_UpdateGlossaryTerm_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateGlossaryTerm_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new { }; - - Response response = await client.UpdateGlossaryTermAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.UpdateGlossaryTermAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4090,285 +3165,195 @@ public async Task Example_UpdateGlossaryTerm_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateGlossaryTerm_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new + ["abbreviation"] = "", + ["templateName"] = new List() +{ +new Dictionary() +}, + ["anchor"] = new Dictionary() { - displayText = "", - glossaryGuid = "", - relationGuid = "", + ["displayText"] = "", + ["glossaryGuid"] = "", + ["relationGuid"] = "", }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new + ["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["updateTime"] = 123.45F, + ["updatedBy"] = "", + ["status"] = "Draft", + ["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, + ["contacts"] = new Dictionary() { - key = new[] { - new { - id = "", - info = "", - } - }, + ["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, }, - attributes = new + ["attributes"] = new Dictionary() { - key = new + ["key"] = new Dictionary() { - key = new { }, + ["key"] = new Dictionary(), }, }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = await client.UpdateGlossaryTermAsync("", RequestContent.Create(data), true); + ["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, + ["classifies"] = new List() +{ +null +}, + ["examples"] = new List() +{ +"" +}, + ["isA"] = new List() +{ +null +}, + ["preferredTerms"] = new List() +{ +null +}, + ["preferredToTerms"] = new List() +{ +null +}, + ["replacedBy"] = new List() +{ +null +}, + ["replacementTerms"] = new List() +{ +null +}, + ["seeAlso"] = new List() +{ +null +}, + ["synonyms"] = new List() +{ +null +}, + ["translatedTerms"] = new List() +{ +null +}, + ["translationTerms"] = new List() +{ +null +}, + ["usage"] = "", + ["validValues"] = new List() +{ +null +}, + ["validValuesFor"] = new List() +{ +null +}, + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = await client.UpdateGlossaryTermAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -4391,20 +3376,20 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -4515,8 +3500,8 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -4531,9 +3516,9 @@ public async Task Example_UpdateGlossaryTerm_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteGlossaryTerm() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryTerm(""); Console.WriteLine(response.Status); @@ -4543,9 +3528,9 @@ public void Example_DeleteGlossaryTerm() [Ignore("Only validating compilation of examples")] public void Example_DeleteGlossaryTerm_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossaryTerm(""); Console.WriteLine(response.Status); @@ -4555,9 +3540,9 @@ public void Example_DeleteGlossaryTerm_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGlossaryTerm_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryTermAsync(""); Console.WriteLine(response.Status); @@ -4567,9 +3552,9 @@ public async Task Example_DeleteGlossaryTerm_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGlossaryTerm_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryTermAsync(""); Console.WriteLine(response.Status); @@ -4579,16 +3564,15 @@ public async Task Example_DeleteGlossaryTerm_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateGlossaryTerm() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = client.PartialUpdateGlossaryTerm("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = client.PartialUpdateGlossaryTerm("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4598,16 +3582,15 @@ public void Example_PartialUpdateGlossaryTerm() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateGlossaryTerm_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = client.PartialUpdateGlossaryTerm("", RequestContent.Create(data), true); + ["key"] = "", + }); + Response response = client.PartialUpdateGlossaryTerm("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -4630,20 +3613,20 @@ public void Example_PartialUpdateGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -4754,8 +3737,8 @@ public void Example_PartialUpdateGlossaryTerm_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -4770,16 +3753,15 @@ public void Example_PartialUpdateGlossaryTerm_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateGlossaryTerm_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = await client.PartialUpdateGlossaryTermAsync("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = await client.PartialUpdateGlossaryTermAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -4789,16 +3771,15 @@ public async Task Example_PartialUpdateGlossaryTerm_Async() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateGlossaryTerm_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = await client.PartialUpdateGlossaryTermAsync("", RequestContent.Create(data), true); + ["key"] = "", + }); + Response response = await client.PartialUpdateGlossaryTermAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("abbreviation").ToString()); @@ -4821,20 +3802,20 @@ public async Task Example_PartialUpdateGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("status").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -4945,8 +3926,8 @@ public async Task Example_PartialUpdateGlossaryTerm_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -4961,15 +3942,15 @@ public async Task Example_PartialUpdateGlossaryTerm_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryTerms() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - new {} -}; - - Response response = client.CreateGlossaryTerms(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.CreateGlossaryTerms(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -4979,282 +3960,198 @@ public void Example_CreateGlossaryTerms() [Ignore("Only validating compilation of examples")] public void Example_CreateGlossaryTerms_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.CreateGlossaryTerms(RequestContent.Create(data), true); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["abbreviation"] = "", +["templateName"] = new List() +{ +new Dictionary() +}, +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["status"] = "Draft", +["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +}, +["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, +["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, +["classifies"] = new List() +{ +null +}, +["examples"] = new List() +{ +"" +}, +["isA"] = new List() +{ +null +}, +["preferredTerms"] = new List() +{ +null +}, +["preferredToTerms"] = new List() +{ +null +}, +["replacedBy"] = new List() +{ +null +}, +["replacementTerms"] = new List() +{ +null +}, +["seeAlso"] = new List() +{ +null +}, +["synonyms"] = new List() +{ +null +}, +["translatedTerms"] = new List() +{ +null +}, +["translationTerms"] = new List() +{ +null +}, +["usage"] = "", +["validValues"] = new List() +{ +null +}, +["validValuesFor"] = new List() +{ +null +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); + Response response = client.CreateGlossaryTerms(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -5277,20 +4174,20 @@ public void Example_CreateGlossaryTerms_AllParameters() Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -5401,8 +4298,8 @@ public void Example_CreateGlossaryTerms_AllParameters() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -5417,15 +4314,15 @@ public void Example_CreateGlossaryTerms_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryTerms_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - new {} -}; - - Response response = await client.CreateGlossaryTermsAsync(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.CreateGlossaryTermsAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -5435,282 +4332,198 @@ public async Task Example_CreateGlossaryTerms_Async() [Ignore("Only validating compilation of examples")] public async Task Example_CreateGlossaryTerms_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new { - key = new { - key = new {}, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.CreateGlossaryTermsAsync(RequestContent.Create(data), true); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["abbreviation"] = "", +["templateName"] = new List() +{ +new Dictionary() +}, +["anchor"] = new Dictionary() +{ +["displayText"] = "", +["glossaryGuid"] = "", +["relationGuid"] = "", +}, +["antonyms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, +["createTime"] = 123.45F, +["createdBy"] = "", +["updateTime"] = 123.45F, +["updatedBy"] = "", +["status"] = "Draft", +["resources"] = new List() +{ +new Dictionary() +{ +["displayName"] = "", +["url"] = "", +} +}, +["contacts"] = new Dictionary() +{ +["key"] = new List() +{ +new Dictionary() +{ +["id"] = "", +["info"] = "", +} +}, +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +}, +["assignedEntities"] = new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}, +["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["relationGuid"] = "", +["status"] = "DRAFT", +} +}, +["classifies"] = new List() +{ +null +}, +["examples"] = new List() +{ +"" +}, +["isA"] = new List() +{ +null +}, +["preferredTerms"] = new List() +{ +null +}, +["preferredToTerms"] = new List() +{ +null +}, +["replacedBy"] = new List() +{ +null +}, +["replacementTerms"] = new List() +{ +null +}, +["seeAlso"] = new List() +{ +null +}, +["synonyms"] = new List() +{ +null +}, +["translatedTerms"] = new List() +{ +null +}, +["translationTerms"] = new List() +{ +null +}, +["usage"] = "", +["validValues"] = new List() +{ +null +}, +["validValuesFor"] = new List() +{ +null +}, +["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, +["longDescription"] = "", +["name"] = "", +["qualifiedName"] = "", +["shortDescription"] = "", +["lastModifiedTS"] = "", +["guid"] = "", +} +}); + Response response = await client.CreateGlossaryTermsAsync(content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -5733,20 +4546,20 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -5857,8 +4670,8 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -5873,11 +4686,11 @@ public async Task Example_CreateGlossaryTerms_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetEntitiesAssignedWithTerm() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", new RequestContext()); + Response response = client.GetEntitiesAssignedWithTerm("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -5887,35 +4700,35 @@ public void Example_GetEntitiesAssignedWithTerm() [Ignore("Only validating compilation of examples")] public void Example_GetEntitiesAssignedWithTerm_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", new RequestContext()); + Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetEntitiesAssignedWithTerm_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetEntitiesAssignedWithTermAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -5925,39 +4738,39 @@ public async Task Example_GetEntitiesAssignedWithTerm_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetEntitiesAssignedWithTerm_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_AssignTermToEntities() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - new {} -}; - - Response response = client.AssignTermToEntities("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.AssignTermToEntities("", content); Console.WriteLine(response.Status); } @@ -5965,47 +4778,37 @@ public void Example_AssignTermToEntities() [Ignore("Only validating compilation of examples")] public void Example_AssignTermToEntities_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.AssignTermToEntities("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); + Response response = client.AssignTermToEntities("", content); Console.WriteLine(response.Status); } @@ -6013,15 +4816,15 @@ public void Example_AssignTermToEntities_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_AssignTermToEntities_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.AssignTermToEntitiesAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.AssignTermToEntitiesAsync("", content); Console.WriteLine(response.Status); } @@ -6029,47 +4832,37 @@ public async Task Example_AssignTermToEntities_Async() [Ignore("Only validating compilation of examples")] public async Task Example_AssignTermToEntities_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.AssignTermToEntitiesAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); + Response response = await client.AssignTermToEntitiesAsync("", content); Console.WriteLine(response.Status); } @@ -6077,15 +4870,15 @@ public async Task Example_AssignTermToEntities_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_RemoveTermAssignmentFromEntities() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - new {} -}; - - Response response = client.RemoveTermAssignmentFromEntities("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.RemoveTermAssignmentFromEntities("", content); Console.WriteLine(response.Status); } @@ -6093,47 +4886,37 @@ public void Example_RemoveTermAssignmentFromEntities() [Ignore("Only validating compilation of examples")] public void Example_RemoveTermAssignmentFromEntities_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.RemoveTermAssignmentFromEntities("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); + Response response = client.RemoveTermAssignmentFromEntities("", content); Console.WriteLine(response.Status); } @@ -6141,15 +4924,15 @@ public void Example_RemoveTermAssignmentFromEntities_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_RemoveTermAssignmentFromEntities_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); Console.WriteLine(response.Status); } @@ -6157,47 +4940,37 @@ public async Task Example_RemoveTermAssignmentFromEntities_Async() [Ignore("Only validating compilation of examples")] public async Task Example_RemoveTermAssignmentFromEntities_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); + Response response = await client.RemoveTermAssignmentFromEntitiesAsync("", content); Console.WriteLine(response.Status); } @@ -6205,15 +4978,15 @@ public async Task Example_RemoveTermAssignmentFromEntities_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteTermAssignmentFromEntities() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - new {} -}; - - Response response = client.DeleteTermAssignmentFromEntities("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = client.DeleteTermAssignmentFromEntities("", content); Console.WriteLine(response.Status); } @@ -6221,47 +4994,37 @@ public void Example_DeleteTermAssignmentFromEntities() [Ignore("Only validating compilation of examples")] public void Example_DeleteTermAssignmentFromEntities_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.DeleteTermAssignmentFromEntities("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); + Response response = client.DeleteTermAssignmentFromEntities("", content); Console.WriteLine(response.Status); } @@ -6269,15 +5032,15 @@ public void Example_DeleteTermAssignmentFromEntities_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTermAssignmentFromEntities_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new {} -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +}); + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); Console.WriteLine(response.Status); } @@ -6285,47 +5048,37 @@ public async Task Example_DeleteTermAssignmentFromEntities_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteTermAssignmentFromEntities_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } -}; + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +new Dictionary() +{ +["displayText"] = "", +["entityStatus"] = "ACTIVE", +["relationshipType"] = "", +["relationshipAttributes"] = new Dictionary() +{ +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +}, +["relationshipGuid"] = "", +["relationshipStatus"] = "ACTIVE", +["guid"] = "", +["typeName"] = "", +["uniqueAttributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +} +}); + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); Console.WriteLine(response.Status); } @@ -6333,81 +5086,81 @@ public async Task Example_DeleteTermAssignmentFromEntities_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetRelatedTerms() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetRelatedTerms("", 1234, 1234, "", new RequestContext()); + Response response = client.GetRelatedTerms("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetRelatedTerms_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetRelatedTerms("", 1234, 1234, "", new RequestContext()); + Response response = client.GetRelatedTerms("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetRelatedTerms_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetRelatedTermsAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].ToString()); + Console.WriteLine(result.GetProperty("")[0].ToString()); } [Test] [Ignore("Only validating compilation of examples")] public async Task Example_GetRelatedTerms_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); } [Test] [Ignore("Only validating compilation of examples")] public void Example_GetGlossary() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossary("", new RequestContext()); + Response response = client.GetGlossary("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -6417,11 +5170,11 @@ public void Example_GetGlossary() [Ignore("Only validating compilation of examples")] public void Example_GetGlossary_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossary("", new RequestContext()); + Response response = client.GetGlossary("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -6446,8 +5199,8 @@ public void Example_GetGlossary_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -6462,11 +5215,11 @@ public void Example_GetGlossary_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossary_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryAsync("", new RequestContext()); + Response response = await client.GetGlossaryAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -6476,11 +5229,11 @@ public async Task Example_GetGlossary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossary_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryAsync("", new RequestContext()); + Response response = await client.GetGlossaryAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -6505,8 +5258,8 @@ public async Task Example_GetGlossary_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -6521,13 +5274,12 @@ public async Task Example_GetGlossary_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_UpdateGlossary() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new { }; - - Response response = client.UpdateGlossary("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.UpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -6537,413 +5289,76 @@ public void Example_UpdateGlossary() [Ignore("Only validating compilation of examples")] public void Example_UpdateGlossary_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - categoryInfo = new - { - key = new - { - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new - { - key = new - { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new - { - key = new { }, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = client.UpdateGlossary("", RequestContent.Create(data)); + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = client.UpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -6968,8 +5383,8 @@ public void Example_UpdateGlossary_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -6984,13 +5399,12 @@ public void Example_UpdateGlossary_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateGlossary_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new { }; - - Response response = await client.UpdateGlossaryAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = await client.UpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -7000,413 +5414,76 @@ public async Task Example_UpdateGlossary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_UpdateGlossary_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - categoryInfo = new - { - key = new - { - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - childrenCategories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - parentCategory = new - { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - }, - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - termInfo = new - { - key = new - { - abbreviation = "", - templateName = new[] { - new {} - }, - anchor = new - { - displayText = "", - glossaryGuid = "", - relationGuid = "", - }, - antonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - createTime = 123.45f, - createdBy = "", - updateTime = 123.45f, - updatedBy = "", - status = "Draft", - resources = new[] { - new { - displayName = "", - url = "", - } - }, - contacts = new - { - key = new[] { - new { - id = "", - info = "", - } - }, - }, - attributes = new - { - key = new - { - key = new { }, - }, - }, - assignedEntities = new[] { - new { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new { - key = new {}, - }, - } - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - relationGuid = "", - status = "DRAFT", - } - }, - classifies = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - examples = new[] { - "" - }, - isA = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - preferredToTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacedBy = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - replacementTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - seeAlso = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - synonyms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translatedTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - translationTerms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - validValues = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - validValuesFor = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }, - }, - categories = new[] { - new { - categoryGuid = "", - description = "", - displayText = "", - parentCategoryGuid = "", - relationGuid = "", - } - }, - language = "", - terms = new[] { - new { - description = "", - displayText = "", - expression = "", - relationGuid = "", - source = "", - status = "DRAFT", - steward = "", - termGuid = "", - } - }, - usage = "", - classifications = new[] { - new { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new { - key = new {}, - }, - attributes = new { - key = new {}, - }, - typeName = "", - lastModifiedTS = "", - } - }, - longDescription = "", - name = "", - qualifiedName = "", - shortDescription = "", - lastModifiedTS = "", - guid = "", - }; - - Response response = await client.UpdateGlossaryAsync("", RequestContent.Create(data)); + ["categories"] = new List() +{ +new Dictionary() +{ +["categoryGuid"] = "", +["description"] = "", +["displayText"] = "", +["parentCategoryGuid"] = "", +["relationGuid"] = "", +} +}, + ["language"] = "", + ["terms"] = new List() +{ +new Dictionary() +{ +["description"] = "", +["displayText"] = "", +["expression"] = "", +["relationGuid"] = "", +["source"] = "", +["status"] = "DRAFT", +["steward"] = "", +["termGuid"] = "", +} +}, + ["usage"] = "", + ["classifications"] = new List() +{ +new Dictionary() +{ +["entityGuid"] = "", +["entityStatus"] = "ACTIVE", +["removePropagationsOnEntityDelete"] = true, +["validityPeriods"] = new List() +{ +new Dictionary() +{ +["endTime"] = "", +["startTime"] = "", +["timeZone"] = "", +} +}, +["source"] = "", +["sourceDetails"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["attributes"] = new Dictionary() +{ +["key"] = new Dictionary(), +}, +["typeName"] = "", +["lastModifiedTS"] = "", +} +}, + ["longDescription"] = "", + ["name"] = "", + ["qualifiedName"] = "", + ["shortDescription"] = "", + ["lastModifiedTS"] = "", + ["guid"] = "", + }); + Response response = await client.UpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -7431,8 +5508,8 @@ public async Task Example_UpdateGlossary_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -7447,9 +5524,9 @@ public async Task Example_UpdateGlossary_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_DeleteGlossary() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossary(""); Console.WriteLine(response.Status); @@ -7459,9 +5536,9 @@ public void Example_DeleteGlossary() [Ignore("Only validating compilation of examples")] public void Example_DeleteGlossary_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = client.DeleteGlossary(""); Console.WriteLine(response.Status); @@ -7471,9 +5548,9 @@ public void Example_DeleteGlossary_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGlossary_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryAsync(""); Console.WriteLine(response.Status); @@ -7483,9 +5560,9 @@ public async Task Example_DeleteGlossary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_DeleteGlossary_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); Response response = await client.DeleteGlossaryAsync(""); Console.WriteLine(response.Status); @@ -7495,11 +5572,11 @@ public async Task Example_DeleteGlossary_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryCategories() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryCategories("", 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryCategories("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -7509,11 +5586,11 @@ public void Example_GetGlossaryCategories() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryCategories_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryCategories("", 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryCategories("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -7544,8 +5621,8 @@ public void Example_GetGlossaryCategories_AllParameters() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -7560,11 +5637,11 @@ public void Example_GetGlossaryCategories_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryCategories_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryCategoriesAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryCategoriesAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -7574,11 +5651,11 @@ public async Task Example_GetGlossaryCategories_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryCategories_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryCategoriesAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryCategoriesAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); @@ -7609,8 +5686,8 @@ public async Task Example_GetGlossaryCategories_AllParameters_Async() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -7625,11 +5702,11 @@ public async Task Example_GetGlossaryCategories_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryCategoriesHeaders() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryCategoriesHeaders("", 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryCategoriesHeaders("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -7639,11 +5716,11 @@ public void Example_GetGlossaryCategoriesHeaders() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryCategoriesHeaders_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryCategoriesHeaders("", 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryCategoriesHeaders("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); @@ -7657,11 +5734,11 @@ public void Example_GetGlossaryCategoriesHeaders_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryCategoriesHeaders_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryCategoriesHeadersAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryCategoriesHeadersAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -7671,11 +5748,11 @@ public async Task Example_GetGlossaryCategoriesHeaders_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryCategoriesHeaders_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryCategoriesHeadersAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryCategoriesHeadersAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); @@ -7689,11 +5766,11 @@ public async Task Example_GetGlossaryCategoriesHeaders_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetDetailedGlossary() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetDetailedGlossary("", true, new RequestContext()); + Response response = client.GetDetailedGlossary("", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -7703,205 +5780,205 @@ public void Example_GetDetailedGlossary() [Ignore("Only validating compilation of examples")] public void Example_GetDetailedGlossary_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetDetailedGlossary("", true, new RequestContext()); + Response response = client.GetDetailedGlossary("", true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -7924,8 +6001,8 @@ public void Example_GetDetailedGlossary_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -7940,11 +6017,11 @@ public void Example_GetDetailedGlossary_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetDetailedGlossary_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetDetailedGlossaryAsync("", true, new RequestContext()); + Response response = await client.GetDetailedGlossaryAsync("", null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -7954,205 +6031,205 @@ public async Task Example_GetDetailedGlossary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetDetailedGlossary_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetDetailedGlossaryAsync("", true, new RequestContext()); + Response response = await client.GetDetailedGlossaryAsync("", true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -8175,8 +6252,8 @@ public async Task Example_GetDetailedGlossary_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -8191,16 +6268,15 @@ public async Task Example_GetDetailedGlossary_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateGlossary() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = client.PartialUpdateGlossary("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = client.PartialUpdateGlossary("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8210,16 +6286,15 @@ public void Example_PartialUpdateGlossary() [Ignore("Only validating compilation of examples")] public void Example_PartialUpdateGlossary_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = client.PartialUpdateGlossary("", RequestContent.Create(data), true); + ["key"] = "", + }); + Response response = client.PartialUpdateGlossary("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -8244,8 +6319,8 @@ public void Example_PartialUpdateGlossary_AllParameters() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -8260,16 +6335,15 @@ public void Example_PartialUpdateGlossary_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateGlossary_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = await client.PartialUpdateGlossaryAsync("", RequestContent.Create(data)); + ["key"] = "", + }); + Response response = await client.PartialUpdateGlossaryAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8279,16 +6353,15 @@ public async Task Example_PartialUpdateGlossary_Async() [Ignore("Only validating compilation of examples")] public async Task Example_PartialUpdateGlossary_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - key = "", - }; - - Response response = await client.PartialUpdateGlossaryAsync("", RequestContent.Create(data), true); + ["key"] = "", + }); + Response response = await client.PartialUpdateGlossaryAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); @@ -8313,8 +6386,8 @@ public async Task Example_PartialUpdateGlossary_AllParameters_Async() Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result.GetProperty("longDescription").ToString()); @@ -8329,11 +6402,11 @@ public async Task Example_PartialUpdateGlossary_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryTerms() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryTerms("", true, 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryTerms("", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -8343,11 +6416,11 @@ public void Example_GetGlossaryTerms() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryTerms_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryTerms("", true, 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryTerms("", true, 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -8370,20 +6443,20 @@ public void Example_GetGlossaryTerms_AllParameters() Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -8494,8 +6567,8 @@ public void Example_GetGlossaryTerms_AllParameters() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -8510,11 +6583,11 @@ public void Example_GetGlossaryTerms_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryTerms_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryTermsAsync("", true, 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryTermsAsync("", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -8524,11 +6597,11 @@ public async Task Example_GetGlossaryTerms_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryTerms_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryTermsAsync("", true, 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryTermsAsync("", true, 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -8551,20 +6624,20 @@ public async Task Example_GetGlossaryTerms_AllParameters_Async() Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -8675,8 +6748,8 @@ public async Task Example_GetGlossaryTerms_AllParameters_Async() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -8691,11 +6764,11 @@ public async Task Example_GetGlossaryTerms_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryTermHeaders() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryTermHeaders("", 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryTermHeaders("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -8705,11 +6778,11 @@ public void Example_GetGlossaryTermHeaders() [Ignore("Only validating compilation of examples")] public void Example_GetGlossaryTermHeaders_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetGlossaryTermHeaders("", 1234, 1234, "", new RequestContext()); + Response response = client.GetGlossaryTermHeaders("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -8726,11 +6799,11 @@ public void Example_GetGlossaryTermHeaders_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryTermHeaders_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryTermHeadersAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryTermHeadersAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -8740,11 +6813,11 @@ public async Task Example_GetGlossaryTermHeaders_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetGlossaryTermHeaders_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetGlossaryTermHeadersAsync("", 1234, 1234, "", new RequestContext()); + Response response = await client.GetGlossaryTermHeadersAsync("", 1234, 1234, "", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("description").ToString()); @@ -8761,11 +6834,11 @@ public async Task Example_GetGlossaryTermHeaders_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetImportCsvOperationStatus() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetImportCsvOperationStatus("", new RequestContext()); + Response response = client.GetImportCsvOperationStatus("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8775,11 +6848,11 @@ public void Example_GetImportCsvOperationStatus() [Ignore("Only validating compilation of examples")] public void Example_GetImportCsvOperationStatus_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetImportCsvOperationStatus("", new RequestContext()); + Response response = client.GetImportCsvOperationStatus("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -8796,11 +6869,11 @@ public void Example_GetImportCsvOperationStatus_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetImportCsvOperationStatus_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetImportCsvOperationStatusAsync("", new RequestContext()); + Response response = await client.GetImportCsvOperationStatusAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8810,11 +6883,11 @@ public async Task Example_GetImportCsvOperationStatus_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetImportCsvOperationStatus_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetImportCsvOperationStatusAsync("", new RequestContext()); + Response response = await client.GetImportCsvOperationStatusAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -8831,15 +6904,15 @@ public async Task Example_GetImportCsvOperationStatus_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_ExportGlossaryTermsAsCsv() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - "" -}; - - Response response = client.ExportGlossaryTermsAsCsv("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.ExportGlossaryTermsAsCsv("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8849,15 +6922,15 @@ public void Example_ExportGlossaryTermsAsCsv() [Ignore("Only validating compilation of examples")] public void Example_ExportGlossaryTermsAsCsv_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - "" -}; - - Response response = client.ExportGlossaryTermsAsCsv("", RequestContent.Create(data), true); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = client.ExportGlossaryTermsAsCsv("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8867,15 +6940,15 @@ public void Example_ExportGlossaryTermsAsCsv_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_ExportGlossaryTermsAsCsv_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - "" -}; - - Response response = await client.ExportGlossaryTermsAsCsvAsync("", RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.ExportGlossaryTermsAsCsvAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8885,15 +6958,15 @@ public async Task Example_ExportGlossaryTermsAsCsv_Async() [Ignore("Only validating compilation of examples")] public async Task Example_ExportGlossaryTermsAsCsv_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - var data = new[] { - "" -}; - - Response response = await client.ExportGlossaryTermsAsCsvAsync("", RequestContent.Create(data), true); + RequestContent content = RequestContent.Create(new List() +{ +"" +}); + Response response = await client.ExportGlossaryTermsAsCsvAsync("", content, includeTermHierarchy: true); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -8903,11 +6976,11 @@ public async Task Example_ExportGlossaryTermsAsCsv_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetTermsByGlossaryName() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetTermsByGlossaryName("", 1234, 1234, true, new RequestContext()); + Response response = client.GetTermsByGlossaryName("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -8917,11 +6990,11 @@ public void Example_GetTermsByGlossaryName() [Ignore("Only validating compilation of examples")] public void Example_GetTermsByGlossaryName_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = client.GetTermsByGlossaryName("", 1234, 1234, true, new RequestContext()); + Response response = client.GetTermsByGlossaryName("", 1234, 1234, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -8944,20 +7017,20 @@ public void Example_GetTermsByGlossaryName_AllParameters() Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -9068,8 +7141,8 @@ public void Example_GetTermsByGlossaryName_AllParameters() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -9084,11 +7157,11 @@ public void Example_GetTermsByGlossaryName_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetTermsByGlossaryName_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetTermsByGlossaryNameAsync("", 1234, 1234, true, new RequestContext()); + Response response = await client.GetTermsByGlossaryNameAsync("", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].ToString()); @@ -9098,11 +7171,11 @@ public async Task Example_GetTermsByGlossaryName_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetTermsByGlossaryName_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - Response response = await client.GetTermsByGlossaryNameAsync("", 1234, 1234, true, new RequestContext()); + Response response = await client.GetTermsByGlossaryNameAsync("", 1234, 1234, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); @@ -9125,20 +7198,20 @@ public async Task Example_GetTermsByGlossaryName_AllParameters_Async() Console.WriteLine(result[0].GetProperty("status").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); - Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); - Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); @@ -9249,8 +7322,8 @@ public async Task Example_GetTermsByGlossaryName_AllParameters_Async() Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); Console.WriteLine(result[0].GetProperty("longDescription").ToString()); @@ -9265,15 +7338,14 @@ public async Task Example_GetTermsByGlossaryName_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_ImportGlossaryTermsViaCsv() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -9282,15 +7354,14 @@ public void Example_ImportGlossaryTermsViaCsv() [Ignore("Only validating compilation of examples")] public void Example_ImportGlossaryTermsViaCsv_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", RequestContent.Create(data), true); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = client.ImportGlossaryTermsViaCsv(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -9306,15 +7377,14 @@ public void Example_ImportGlossaryTermsViaCsv_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_ImportGlossaryTermsViaCsv_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -9323,15 +7393,14 @@ public async Task Example_ImportGlossaryTermsViaCsv_Async() [Ignore("Only validating compilation of examples")] public async Task Example_ImportGlossaryTermsViaCsv_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", RequestContent.Create(data), true); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = await client.ImportGlossaryTermsViaCsvAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -9347,15 +7416,14 @@ public async Task Example_ImportGlossaryTermsViaCsv_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_ImportGlossaryTermsViaCsvByGlossaryName() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -9364,15 +7432,14 @@ public void Example_ImportGlossaryTermsViaCsvByGlossaryName() [Ignore("Only validating compilation of examples")] public void Example_ImportGlossaryTermsViaCsvByGlossaryName_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", RequestContent.Create(data), true); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = client.ImportGlossaryTermsViaCsvByGlossaryName(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); @@ -9388,15 +7455,14 @@ public void Example_ImportGlossaryTermsViaCsvByGlossaryName_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_ImportGlossaryTermsViaCsvByGlossaryName_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", RequestContent.Create(data)); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.ToString()); } @@ -9405,15 +7471,14 @@ public async Task Example_ImportGlossaryTermsViaCsvByGlossaryName_Async() [Ignore("Only validating compilation of examples")] public async Task Example_ImportGlossaryTermsViaCsvByGlossaryName_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); - - var data = File.OpenRead(""); - - var operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", RequestContent.Create(data), true); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewGlossaries client = new PurviewCatalogClient(endpoint, credential).GetPurviewGlossariesClient(); + RequestContent content = RequestContent.Create(File.OpenRead("")); + Operation operation = await client.ImportGlossaryTermsViaCsvByGlossaryNameAsync(WaitUntil.Completed, "", content, includeTermHierarchy: true); BinaryData responseData = operation.Value; + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("status").ToString()); diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewLineages.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewLineages.cs index 6e4343c033cb..407fa1a2c367 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewLineages.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewLineages.cs @@ -6,11 +6,10 @@ #nullable disable using System; -using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Catalog; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,11 +22,11 @@ internal class Samples_PurviewLineages [Ignore("Only validating compilation of examples")] public void Example_GetLineageGraph() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = client.GetLineageGraph("", "", 1234, 1234, true, true, new RequestContext()); + Response response = client.GetLineageGraph("", "BOTH", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -37,46 +36,46 @@ public void Example_GetLineageGraph() [Ignore("Only validating compilation of examples")] public void Example_GetLineageGraph_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = client.GetLineageGraph("", "", 1234, 1234, true, true, new RequestContext()); + Response response = client.GetLineageGraph("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -94,11 +93,11 @@ public void Example_GetLineageGraph_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLineageGraph_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = await client.GetLineageGraphAsync("", "", 1234, 1234, true, true, new RequestContext()); + Response response = await client.GetLineageGraphAsync("", "BOTH", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -108,46 +107,46 @@ public async Task Example_GetLineageGraph_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLineageGraph_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = await client.GetLineageGraphAsync("", "", 1234, 1234, true, true, new RequestContext()); + Response response = await client.GetLineageGraphAsync("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -165,11 +164,11 @@ public async Task Example_GetLineageGraph_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_NextPageLineage() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = client.NextPageLineage("", "", true, 1234, 1234, new RequestContext()); + Response response = client.NextPageLineage("", "BOTH", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -179,46 +178,46 @@ public void Example_NextPageLineage() [Ignore("Only validating compilation of examples")] public void Example_NextPageLineage_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = client.NextPageLineage("", "", true, 1234, 1234, new RequestContext()); + Response response = client.NextPageLineage("", "BOTH", true, 1234, 1234, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -236,11 +235,11 @@ public void Example_NextPageLineage_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_NextPageLineage_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = await client.NextPageLineageAsync("", "", true, 1234, 1234, new RequestContext()); + Response response = await client.NextPageLineageAsync("", "BOTH", null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -250,46 +249,46 @@ public async Task Example_NextPageLineage_Async() [Ignore("Only validating compilation of examples")] public async Task Example_NextPageLineage_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = await client.NextPageLineageAsync("", "", true, 1234, 1234, new RequestContext()); + Response response = await client.NextPageLineageAsync("", "BOTH", true, 1234, 1234, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -307,11 +306,11 @@ public async Task Example_NextPageLineage_AllParameters_Async() [Ignore("Only validating compilation of examples")] public void Example_GetLineageByUniqueAttribute() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = client.GetLineageByUniqueAttribute("", "", 1234, 1234, true, true, new RequestContext()); + Response response = client.GetLineageByUniqueAttribute("", "BOTH", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -321,46 +320,46 @@ public void Example_GetLineageByUniqueAttribute() [Ignore("Only validating compilation of examples")] public void Example_GetLineageByUniqueAttribute_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = client.GetLineageByUniqueAttribute("", "", 1234, 1234, true, true, new RequestContext()); + Response response = client.GetLineageByUniqueAttribute("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); @@ -378,11 +377,11 @@ public void Example_GetLineageByUniqueAttribute_AllParameters() [Ignore("Only validating compilation of examples")] public async Task Example_GetLineageByUniqueAttribute_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = await client.GetLineageByUniqueAttributeAsync("", "", 1234, 1234, true, true, new RequestContext()); + Response response = await client.GetLineageByUniqueAttributeAsync("", "BOTH", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -392,46 +391,46 @@ public async Task Example_GetLineageByUniqueAttribute_Async() [Ignore("Only validating compilation of examples")] public async Task Example_GetLineageByUniqueAttribute_AllParameters_Async() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewLineages client = new PurviewCatalogClient(endpoint, credential).GetPurviewLineagesClient(); - Response response = await client.GetLineageByUniqueAttributeAsync("", "", 1234, 1234, true, true, new RequestContext()); + Response response = await client.GetLineageByUniqueAttributeAsync("", "BOTH", 1234, 1234, true, true, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); - Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); - Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("sourceDetails").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); Console.WriteLine(result.GetProperty("lineageDepth").ToString()); Console.WriteLine(result.GetProperty("lineageWidth").ToString()); Console.WriteLine(result.GetProperty("includeParent").ToString()); diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewRelationships.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewRelationships.cs index b3758165686e..54a67c5a539b 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewRelationships.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/tests/Generated/Samples/Samples_PurviewRelationships.cs @@ -7,10 +7,10 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Analytics.Purview.Catalog; using Azure.Core; using Azure.Identity; using NUnit.Framework; @@ -23,13 +23,12 @@ internal class Samples_PurviewRelationships [Ignore("Only validating compilation of examples")] public void Example_Create() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - var data = new { }; - - Response response = client.Create(RequestContent.Create(data)); + RequestContent content = RequestContent.Create(new Dictionary()); + Response response = client.Create(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -39,117 +38,51 @@ public void Example_Create() [Ignore("Only validating compilation of examples")] public void Example_Create_AllParameters() { - var credential = new DefaultAzureCredential(); - var endpoint = new Uri(""); - var client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PurviewRelationships client = new PurviewCatalogClient(endpoint, credential).GetPurviewRelationshipsClient(); - var data = new + RequestContent content = RequestContent.Create(new Dictionary() { - createTime = 123.45f, - createdBy = "", - end1 = new - { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new - { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new - { - key = new { }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new { }, - }, - }, - end2 = new + ["createTime"] = 123.45F, + ["createdBy"] = "", + ["end1"] = new Dictionary() { - displayText = "", - entityStatus = "ACTIVE", - relationshipType = "", - relationshipAttributes = new + ["guid"] = "", + ["typeName"] = "", + ["uniqueAttributes"] = new Dictionary() { - entityGuid = "", - entityStatus = "ACTIVE", - removePropagationsOnEntityDelete = true, - validityPeriods = new[] { - new { - endTime = "", - startTime = "", - timeZone = "", - } - }, - source = "", - sourceDetails = new - { - key = new { }, - }, - attributes = new - { - key = new { }, - }, - typeName = "", - lastModifiedTS = "", - }, - relationshipGuid = "", - relationshipStatus = "ACTIVE", - guid = "", - typeName = "", - uniqueAttributes = new - { - key = new { }, + ["key"] = new Dictionary(), }, }, - guid = "", - homeId = "", - label = "